diff options
| author | ame <[email protected]> | 2023-10-15 22:45:54 -0500 |
|---|---|---|
| committer | ame <[email protected]> | 2023-10-15 22:45:54 -0500 |
| commit | ea8f0940f041d33c0085bed59773093333a4fd99 (patch) | |
| tree | 636683752d2426147c076d5b64d1831ca430a979 /src/len.c | |
init
Diffstat (limited to 'src/len.c')
| -rw-r--r-- | src/len.c | 15 |
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; +} |
