aboutsummaryrefslogtreecommitdiff
path: root/src/reg.c
diff options
context:
space:
mode:
authorame <[email protected]>2024-01-23 14:13:45 -0600
committerame <[email protected]>2024-01-23 14:13:45 -0600
commit91957f73e6459a549926e614144101e16043e825 (patch)
tree0671f1abedab63573f3212d82d5c759b80c15422 /src/reg.c
parented534e07dbdddc411d84b552e52b016661416754 (diff)
almost working great, fix 35th con
Diffstat (limited to 'src/reg.c')
-rw-r--r--src/reg.c28
1 files changed, 6 insertions, 22 deletions
diff --git a/src/reg.c b/src/reg.c
index 030a93f..3d991a2 100644
--- a/src/reg.c
+++ b/src/reg.c
@@ -36,29 +36,13 @@ int luaopen_llib(lua_State* L) {
lua_newtable(L);
//lua_newtable(L);
- lua_pushstring(L, "array");
- luaL_register(L, NULL, array_function_list);
- lua_settable(L, -3);
- lua_pushstring(L, "crypto");
- luaL_register(L, NULL, crypto_function_list);
- lua_settable(L, -3);
-
- lua_pushstring(L, "io");
- luaL_register(L, NULL, io_function_list);
- lua_settable(L, -3);
-
- lua_pushstring(L, "math");
- luaL_register(L, NULL, math_function_list);
- lua_settable(L, -3);
-
- lua_pushstring(L, "config");
- luaL_register(L, NULL, config_function_list);
- lua_settable(L, -3);
-
- lua_pushstring(L, "net");
- luaL_register(L, NULL, net_function_list);
- lua_settable(L, -3);
+ 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);
//make llib global
lua_setglobal(L, "llib");