]> git.ipfire.org Git - location/libloc.git/blobdiff - src/lua/location.c
lua: Add a Database object with a dummy lookup function
[location/libloc.git] / src / lua / location.c
index a61a9aedd1e7fb70316d2bfe5d8c9778c7040cfd..ee9bce512a24a14f4346b8fec85031fabad19d25 100644 (file)
@@ -24,6 +24,7 @@
 #include <libloc/libloc.h>
 
 #include "location.h"
+#include "database.h"
 
 struct loc_ctx* ctx = NULL;
 
@@ -49,5 +50,10 @@ int luaopen_location(lua_State* L) {
        // Register functions
        luaL_newlib(L, location_functions);
 
+       // Register Database type
+       register_database(L);
+
+       lua_setfield(L, -2, "Database");
+
        return 1;
 }