aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_map.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-08-15 16:20:41 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-08-15 16:20:59 +0100
commit938a0dba32a7f1632c3e14b92d986384aff19d7a (patch)
tree32e64f23e9bbed4c9123fb19972406ed6349d1d1 /src/lua/lua_map.c
parent46d32375ac0fe58156da513670ea7c9bccf0aed2 (diff)
downloadrspamd-938a0dba32a7f1632c3e14b92d986384aff19d7a.tar.gz
rspamd-938a0dba32a7f1632c3e14b92d986384aff19d7a.zip
[Minor] Better Lua 5.3 compatibility
Diffstat (limited to 'src/lua/lua_map.c')
-rw-r--r--src/lua/lua_map.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lua/lua_map.c b/src/lua/lua_map.c
index 5af724577..1621abf0d 100644
--- a/src/lua/lua_map.c
+++ b/src/lua/lua_map.c
@@ -894,7 +894,7 @@ lua_map_traverse_cb (gconstpointer key,
lua_State *L = (lua_State *)ud;
lua_pushstring (L, key);
- lua_pushnumber (L, hits);
+ lua_pushinteger (L, hits);
lua_settable (L, -3);
return TRUE;
@@ -950,7 +950,7 @@ lua_map_get_nelts (lua_State * L)
struct rspamd_lua_map *map = lua_check_map (L, 1);
if (map != NULL) {
- lua_pushnumber (L, map->map->nelts);
+ lua_pushinteger (L, map->map->nelts);
}
else {
return luaL_error (L, "invalid arguments");