From 19a8eafc15aec0b7023b6bb09fc6bb72e8a714ab Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 22 Jan 2015 13:04:15 -0800 Subject: Use luaL_{check,opt}integer() rather than luaL_{check,opt}int(). Lua prior to 5.3 defined luaL_{check,opt}int() as macros wrapping luaL_{check,opt}integer() with a cast to int; Lua 5.3 doesn't. It sounds as if the Lua developers are deprecating luaL_{check,opt}int(): http://osdir.com/ml/general/2014-10/msg46568.html Change-Id: I2d0b649dcd57ede124f31d39f7945f342ae9b18f Reviewed-on: https://code.wireshark.org/review/6744 Petri-Dish: Guy Harris Reviewed-by: Guy Harris Reviewed-by: Hadriel Kaplan Petri-Dish: Hadriel Kaplan Tested-by: Petri Dish Buildbot Tested-by: Hadriel Kaplan --- epan/wslua/wslua_internals.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'epan/wslua/wslua_internals.c') diff --git a/epan/wslua/wslua_internals.c b/epan/wslua/wslua_internals.c index e27f5cba6b..5ca92ecb57 100644 --- a/epan/wslua/wslua_internals.c +++ b/epan/wslua/wslua_internals.c @@ -52,7 +52,7 @@ WSLUA_API gboolean wslua_toboolean(lua_State* L, int n) { if ( lua_isboolean(L,n) || lua_isnil(L,n) || lua_gettop(L) < n ) { val = lua_toboolean(L,n); } else if ( lua_type(L,n) == LUA_TNUMBER ) { - int num = luaL_checkint(L,n); + int num = (int)luaL_checkinteger(L,n); val = num != 0 ? TRUE : FALSE; } else { luaL_argerror(L,n,"must be a boolean or number"); @@ -61,7 +61,7 @@ WSLUA_API gboolean wslua_toboolean(lua_State* L, int n) { return val; } -/* like luaL_checkint, except for booleans - this does not coerce other types */ +/* like luaL_checkinteger, except for booleans - this does not coerce other types */ WSLUA_API gboolean wslua_checkboolean(lua_State* L, int n) { if (!lua_isboolean(L,n) ) { -- cgit v1.2.3