deprecated "cast macros" ('luaL_checkint', 'luaL_optint', etc.)
This commit is contained in:
4
loslib.c
4
loslib.c
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: loslib.c,v 1.45 2014/03/20 19:18:54 roberto Exp roberto $
|
||||
** $Id: loslib.c,v 1.46 2014/04/29 17:05:13 roberto Exp roberto $
|
||||
** Standard Operating System library
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@@ -319,7 +319,7 @@ static int os_exit (lua_State *L) {
|
||||
if (lua_isboolean(L, 1))
|
||||
status = (lua_toboolean(L, 1) ? EXIT_SUCCESS : EXIT_FAILURE);
|
||||
else
|
||||
status = luaL_optint(L, 1, EXIT_SUCCESS);
|
||||
status = (int)luaL_optinteger(L, 1, EXIT_SUCCESS);
|
||||
if (lua_toboolean(L, 2))
|
||||
lua_close(L);
|
||||
if (L) exit(status); /* 'if' to avoid warnings for unreachable 'return' */
|
||||
|
||||
Reference in New Issue
Block a user