aboutsummaryrefslogtreecommitdiff
path: root/src/reg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/reg.c')
-rw-r--r--src/reg.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/reg.c b/src/reg.c
index bb1cf18..b90e03d 100644
--- a/src/reg.c
+++ b/src/reg.c
@@ -7,6 +7,7 @@
#include "thread.h"
#include "test.h"
#include "config.h"
+#include "lullaby.h"
#define open_common(name, config)\
int luaopen_lullaby_##name (lua_State* L){\
@@ -32,8 +33,8 @@ open_common(test, test_config);
#define push(T, name)\
lua_pushstring(L, #name);\
- luaopen_lullaby_##name(L);\
- lua_settable(L, T);
+luaopen_lullaby_##name(L);\
+lua_settable(L, T);
int luaopen_lullaby(lua_State* L) {
@@ -49,6 +50,8 @@ int luaopen_lullaby(lua_State* L) {
push(top, test);
luaI_tsets(L, top, "version", GIT_COMMIT);
+ lua_pushvalue(L, top);
+
lua_settop(L, top);
return 1;
}