aboutsummaryrefslogtreecommitdiff
path: root/src/reg.c
diff options
context:
space:
mode:
authoramelia squires <[email protected]>2025-04-16 13:54:00 -0500
committeramelia squires <[email protected]>2025-04-16 13:54:00 -0500
commitb2ee662b4621282b137a2a2cf1be13bd60073c5a (patch)
tree280ab21571a29f76d880c939642175602e6177e0 /src/reg.c
parent8887668e977ff1c6e213768b954b086f6be0738c (diff)
fixes for 5.1v0.0.0
Diffstat (limited to 'src/reg.c')
-rw-r--r--src/reg.c60
1 files changed, 14 insertions, 46 deletions
diff --git a/src/reg.c b/src/reg.c
index 98419bc..e6715c3 100644
--- a/src/reg.c
+++ b/src/reg.c
@@ -7,22 +7,6 @@
#include "thread.h"
#include "test.h"
#include "config.h"
-#include <signal.h>
-#include <stdlib.h>
-
-void sigHandle(int s){
- //signal(s, SIG_IGN);
-
- //signal(s, sigHandle);
- exit(s);
-}
-
-static int lua_exit(lua_State* L){
-
- lib_thread_clean();
- //sigHandle(0);
- return 0;
-}
#define open_common(name)\
int luaopen_lullaby_##name (lua_State* L){\
@@ -48,34 +32,18 @@ open_common(test);
int luaopen_lullaby(lua_State* L) {
- /*lua_newuserdata(L, 1);
- int ud = lua_gettop(L);
- lua_newtable(L);
- int meta = lua_gettop(L);
- luaI_tsetcf(L, meta, "__gc", lua_exit);
- lua_pushvalue(L, meta);
- lua_setmetatable(L, ud);*/
- //create <lib>.array functions
- lua_newtable(L);
- int top = lua_gettop(L);
- //lua_newtable(L);
-
- push(top, array);
- push(top, crypto);
- push(top, io);
- push(top, math);
- push(top, net);
- push(top, thread);
- push(top, test);
- luaI_tsets(L, top, "version", GIT_COMMIT)
-
- //lreg("array", array_function_list);
- //lreg("crypto", crypto_function_list);
- //lreg("io", io_function_list);
- //lreg("math", math_function_list);
- //lreg("config", config_function_list);
- //lreg("net", net_function_list);
- //lreg("thread", thread_function_list);
- lua_settop(L, top);
- return 1;
+ lua_newtable(L);
+ int top = lua_gettop(L);
+
+ push(top, array);
+ push(top, crypto);
+ push(top, io);
+ push(top, math);
+ push(top, net);
+ push(top, thread);
+ push(top, test);
+ luaI_tsets(L, top, "version", GIT_COMMIT)
+
+ lua_settop(L, top);
+ return 1;
}