From b8018f12baacf3305146f597a2689648c92dff3f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 2 Aug 2012 18:39:17 +0200 Subject: DatabaseGlue: add function GetDatabase() Allow using the object outside of DatabaseGlue.cxx. --- src/DatabaseGlue.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/DatabaseGlue.cxx') diff --git a/src/DatabaseGlue.cxx b/src/DatabaseGlue.cxx index 551facc47..0f946d3ed 100644 --- a/src/DatabaseGlue.cxx +++ b/src/DatabaseGlue.cxx @@ -18,6 +18,7 @@ */ #include "config.h" +#include "DatabaseGlue.hxx" extern "C" { #include "database.h" @@ -79,6 +80,14 @@ db_finish(void) delete db; } +const Database * +GetDatabase() +{ + assert(db == NULL || db_is_open); + + return db; +} + struct directory * db_get_root(void) { -- cgit v1.2.3