diff options
author | Johannes Dewender <rpm@JonnyJD.net> | 2015-05-18 10:11:13 +0200 |
---|---|---|
committer | Lubos Kardos <lkardos@redhat.com> | 2015-06-01 16:20:40 +0200 |
commit | 140744377b019e0de81d76d0931c32228d2ed57e (patch) | |
tree | b06082cb5b659231d3409c227d3db0b2c7150429 /luaext/lposix.c | |
parent | 93a2f6ae9285298830c0c62dbf2d62c4acd7d1b1 (diff) | |
download | rpm-140744377b019e0de81d76d0931c32228d2ed57e.tar.gz |
remove luaL_checkint, deprecated in lua 5.3
luaL_checkint and luaL_optint are deprecated in lua 5.3
The variants luaL_checkinteger and luaL_optinteger work
the same with an implicit typecast (lua_integer -> int).
Diffstat (limited to 'luaext/lposix.c')
-rw-r--r-- | luaext/lposix.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/luaext/lposix.c b/luaext/lposix.c index a59be3e92..51ea2b3af 100644 --- a/luaext/lposix.c +++ b/luaext/lposix.c @@ -361,22 +361,22 @@ static int Pfork(lua_State *L) /** fork() */ static int Pwait(lua_State *L) /** wait([pid]) */ { - pid_t pid = luaL_optint(L, 1, -1); + pid_t pid = luaL_optinteger(L, 1, -1); return pushresult(L, waitpid(pid, NULL, 0), NULL); } static int Pkill(lua_State *L) /** kill(pid,[sig]) */ { - pid_t pid = luaL_checkint(L, 1); - int sig = luaL_optint(L, 2, SIGTERM); + pid_t pid = luaL_checkinteger(L, 1); + int sig = luaL_optinteger(L, 2, SIGTERM); return pushresult(L, kill(pid, sig), NULL); } static int Psleep(lua_State *L) /** sleep(seconds) */ { - unsigned int seconds = luaL_checkint(L, 1); + unsigned int seconds = luaL_checkinteger(L, 1); lua_pushnumber(L, sleep(seconds)); return 1; } @@ -529,7 +529,7 @@ static int Pgetprocessid(lua_State *L) /** getprocessid([selector]) */ static int Pttyname(lua_State *L) /** ttyname(fd) */ { - int fd=luaL_optint(L, 1, 0); + int fd=luaL_optinteger(L, 1, 0); lua_pushstring(L, ttyname(fd)); return 1; } @@ -880,7 +880,7 @@ static int exit_override(lua_State *L) if (!have_forked) return luaL_error(L, "exit not permitted in this context"); - exit(luaL_optint(L, 1, EXIT_SUCCESS)); + exit(luaL_optinteger(L, 1, EXIT_SUCCESS)); } static const luaL_Reg os_overrides[] = |