deprecated "cast macros" ('luaL_checkint', 'luaL_optint', etc.)

This commit is contained in:
Roberto Ierusalimschy
2014-10-01 08:54:56 -03:00
parent 34b6664dcb
commit 798660c9cd
11 changed files with 70 additions and 65 deletions

View File

@@ -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' */