aboutsummaryrefslogtreecommitdiff
path: root/loslib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-10-01 08:54:56 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-10-01 08:54:56 -0300
commit798660c9cddef8a73f68058576e3d47eed2b1a27 (patch)
treea0aef60fd2f6910ea7ecf6be127f9035e9ce3e07 /loslib.c
parent34b6664dcb28b18ca3f08ed5e36da094b007eb7b (diff)
downloadlua-798660c9cddef8a73f68058576e3d47eed2b1a27.tar.gz
lua-798660c9cddef8a73f68058576e3d47eed2b1a27.tar.bz2
lua-798660c9cddef8a73f68058576e3d47eed2b1a27.zip
deprecated "cast macros" ('luaL_checkint', 'luaL_optint', etc.)
Diffstat (limited to 'loslib.c')
-rw-r--r--loslib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/loslib.c b/loslib.c
index c55a6526..209e74cd 100644
--- a/loslib.c
+++ b/loslib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: loslib.c,v 1.45 2014/03/20 19:18:54 roberto Exp roberto $ 2** $Id: loslib.c,v 1.46 2014/04/29 17:05:13 roberto Exp roberto $
3** Standard Operating System library 3** Standard Operating System library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -319,7 +319,7 @@ static int os_exit (lua_State *L) {
319 if (lua_isboolean(L, 1)) 319 if (lua_isboolean(L, 1))
320 status = (lua_toboolean(L, 1) ? EXIT_SUCCESS : EXIT_FAILURE); 320 status = (lua_toboolean(L, 1) ? EXIT_SUCCESS : EXIT_FAILURE);
321 else 321 else
322 status = luaL_optint(L, 1, EXIT_SUCCESS); 322 status = (int)luaL_optinteger(L, 1, EXIT_SUCCESS);
323 if (lua_toboolean(L, 2)) 323 if (lua_toboolean(L, 2))
324 lua_close(L); 324 lua_close(L);
325 if (L) exit(status); /* 'if' to avoid warnings for unreachable 'return' */ 325 if (L) exit(status); /* 'if' to avoid warnings for unreachable 'return' */