lua: Lua 5.3 support
Some checks failed
Build libubox / Build libubox (push) Has been cancelled
CodeQL / Analyze (c-cpp) (push) Has been cancelled

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
This commit is contained in:
Raito Bezarius 2024-09-08 00:57:03 +02:00
parent eb9bcb6418
commit 1c4b2dc4c1

View file

@ -67,7 +67,7 @@ ul_create_userdata(lua_State *L, size_t size, const luaL_Reg *reg, lua_CFunction
lua_pushvalue(L, -1);
lua_setmetatable(L, -3);
lua_pushvalue(L, -2);
luaI_openlib(L, NULL, reg, 1);
luaL_openlib(L, NULL, reg, 1);
lua_pushvalue(L, -2);
return ret;
@ -351,8 +351,8 @@ static int ul_process(lua_State *L)
if (pid == 0) {
/* child */
int argn = lua_objlen(L, -3);
int envn = lua_objlen(L, -2);
int argn = lua_rawlen(L, -3);
int envn = lua_rawlen(L, -2);
char** argp = malloc(sizeof(char*) * (argn + 2));
char** envp = malloc(sizeof(char*) * (envn + 1));
int i = 1;
@ -597,7 +597,7 @@ static int ul_end(lua_State *L)
return 1;
}
static luaL_reg uloop_func[] = {
static luaL_Reg uloop_func[] = {
{"init", ul_init},
{"run", ul_run},
{"timer", ul_timer},