aboutsummaryrefslogtreecommitdiff
path: root/src/reg.c
diff options
context:
space:
mode:
authorame <[email protected]>2023-10-18 16:30:38 -0500
committerame <[email protected]>2023-10-18 16:30:38 -0500
commit034f54b14416dd411fbd204f8b5465b8bc462b76 (patch)
tree6a551b9b4633f2570159eeb83a8f8ac9e1019100 /src/reg.c
parentb137acbcb983359568c0b9b2851ef7bbba9617b7 (diff)
md5 and sorting improvments
Diffstat (limited to 'src/reg.c')
-rw-r--r--src/reg.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/reg.c b/src/reg.c
new file mode 100644
index 0000000..cdc6267
--- /dev/null
+++ b/src/reg.c
@@ -0,0 +1,19 @@
+#include "lua.h"
+#include "table.h"
+#include "crypto.h"
+
+int luaopen_llib(lua_State* L) {
+ lua_newtable(L);
+
+ //create <lib>.array functions
+ lua_newtable(L);
+ luaL_register(L, NULL, array_function_list);
+ lua_setfield(L, 2, "array");
+
+ lua_newtable(L);
+ luaL_register(L, NULL, crypto_function_list);
+ lua_setfield(L, 2, "crypto");
+ //make llib global
+ lua_setglobal(L, "llib");
+ return 1;
+}