aboutsummaryrefslogtreecommitdiff
path: root/src/len.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/len.c')
-rw-r--r--src/len.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/len.c b/src/len.c
new file mode 100644
index 0000000..15e84ac
--- /dev/null
+++ b/src/len.c
@@ -0,0 +1,15 @@
+#include "lua.h"
+#include "table.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");
+
+ //make llib global
+ lua_setglobal(L, "llib");
+ return 1;
+}