DatabaseGlue: add function GetDatabase()

Allow using the object outside of DatabaseGlue.cxx.
This commit is contained in:
Max Kellermann
2012-08-02 18:39:17 +02:00
parent 607780b7f9
commit b8018f12ba
2 changed files with 44 additions and 0 deletions

View File

@@ -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)
{