From ea8f0940f041d33c0085bed59773093333a4fd99 Mon Sep 17 00:00:00 2001 From: ame Date: Sun, 15 Oct 2023 22:45:54 -0500 Subject: init --- src/len.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/len.c (limited to 'src/len.c') 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 .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; +} -- cgit v1.2.3