diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-01-22 13:04:15 -0800 |
---|---|---|
committer | Hadriel Kaplan <hadrielk@yahoo.com> | 2015-01-23 03:58:29 +0000 |
commit | 19a8eafc15aec0b7023b6bb09fc6bb72e8a714ab (patch) | |
tree | 983fe2fb80d1886dfa7618ef3e893101b0734b61 /epan/wslua/wslua_int64.c | |
parent | 2eaa467b34d78b216a1ba9305bd23a9196209b3b (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_int64.c')
-rw-r--r-- | epan/wslua/wslua_int64.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/wslua/wslua_int64.c b/epan/wslua/wslua_int64.c index 6c08373184..5abcf30dae 100644 --- a/epan/wslua/wslua_int64.c +++ b/epan/wslua/wslua_int64.c @@ -269,10 +269,10 @@ WSLUA_METHOD Int64_tohex(lua_State* L) { #define WSLUA_OPTARG_Int64_new_NUMBYTES 2 /* The number of hex-chars/nibbles to generate, negative means uppercase (default=16). */ gint64 b = getInt64(L,1); - gint n = luaL_optint(L, WSLUA_OPTARG_Int64_new_NUMBYTES, 16); + lua_Integer n = luaL_optinteger(L, WSLUA_OPTARG_Int64_new_NUMBYTES, 16); const gchar *hexdigits = "0123456789abcdef"; gchar buf[16]; - gint i; + lua_Integer i; if (n < 0) { n = -n; hexdigits = "0123456789ABCDEF"; } if (n > 16) n = 16; for (i = n-1; i >= 0; --i) { buf[i] = hexdigits[b & 15]; b >>= 4; } @@ -829,10 +829,10 @@ WSLUA_METHOD UInt64_tohex(lua_State* L) { #define WSLUA_OPTARG_UInt64_new_NUMBYTES 2 /* The number of hex-chars/nibbles to generate, negative means uppercase (default=16). */ guint64 b = getUInt64(L,1); - gint n = luaL_optint(L, WSLUA_OPTARG_UInt64_new_NUMBYTES, 16); + lua_Integer n = luaL_optinteger(L, WSLUA_OPTARG_UInt64_new_NUMBYTES, 16); const gchar *hexdigits = "0123456789abcdef"; gchar buf[16]; - gint i; + lua_Integer i; if (n < 0) { n = -n; hexdigits = "0123456789ABCDEF"; } if (n > 16) n = 16; for (i = n-1; i >= 0; --i) { buf[i] = hexdigits[b & 15]; b >>= 4; } |