From 938a0dba32a7f1632c3e14b92d986384aff19d7a Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 15 Aug 2018 16:20:41 +0100 Subject: [Minor] Better Lua 5.3 compatibility --- src/lua/lua_map.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lua/lua_map.c') 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"); -- cgit v1.2.3