aboutsummaryrefslogtreecommitdiffstats
path: root/epan/wslua/wslua_internals.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-01-22 13:04:15 -0800
committerHadriel Kaplan <hadrielk@yahoo.com>2015-01-23 03:58:29 +0000
commit19a8eafc15aec0b7023b6bb09fc6bb72e8a714ab (patch)
tree983fe2fb80d1886dfa7618ef3e893101b0734b61 /epan/wslua/wslua_internals.c
parent2eaa467b34d78b216a1ba9305bd23a9196209b3b (diff)
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 <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Tested-by: Hadriel Kaplan <hadrielk@yahoo.com>
Diffstat (limited to 'epan/wslua/wslua_internals.c')
-rw-r--r--epan/wslua/wslua_internals.c4
1 files changed, 2 insertions, 2 deletions
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) ) {