lua: Lua 5.3 support
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
This commit is contained in:
parent
eb9bcb6418
commit
1c4b2dc4c1
1 changed files with 4 additions and 4 deletions
|
@ -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},
|
||||
|
|
Loading…
Reference in a new issue