]> git.ipfire.org Git - location/libloc.git/blobdiff - src/lua/location.c
lua: Create Country objects
[location/libloc.git] / src / lua / location.c
index 315a790413113f7186b66b33b654af12d3875e8a..797d2e81535f626c2788ac432a39bdce376a45bf 100644 (file)
@@ -24,6 +24,7 @@
 #include <libloc/libloc.h>
 
 #include "location.h"
+#include "country.h"
 #include "database.h"
 #include "network.h"
 
@@ -51,6 +52,11 @@ int luaopen_location(lua_State* L) {
        // Register functions
        luaL_newlib(L, location_functions);
 
+       // Register Country type
+       register_country(L);
+
+       lua_setfield(L, -2, "Country");
+
        // Register Database type
        register_database(L);