aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_mempool.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_mempool.c
parent46d32375ac0fe58156da513670ea7c9bccf0aed2 (diff)
downloadrspamd-938a0dba32a7f1632c3e14b92d986384aff19d7a.tar.gz
rspamd-938a0dba32a7f1632c3e14b92d986384aff19d7a.zip
[Minor] Better Lua 5.3 compatibility
Diffstat (limited to 'src/lua/lua_mempool.c')
-rw-r--r--src/lua/lua_mempool.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lua/lua_mempool.c b/src/lua/lua_mempool.c
index e5cb94219..4fce73aac 100644
--- a/src/lua/lua_mempool.c
+++ b/src/lua/lua_mempool.c
@@ -252,7 +252,7 @@ lua_mempool_suggest_size (lua_State *L)
struct memory_pool_s *mempool = rspamd_lua_check_mempool (L, 1);
if (mempool) {
- lua_pushnumber (L, rspamd_mempool_suggest_size ());
+ lua_pushinteger (L, rspamd_mempool_suggest_size ());
return 0;
}
else {
@@ -437,12 +437,12 @@ lua_mempool_get_variable (lua_State *L)
}
else if (len == sizeof ("int") - 1 &&
g_ascii_strncasecmp (pt, "int", len) == 0) {
- lua_pushnumber (L, *(gint *)pv);
+ lua_pushinteger (L, *(gint *)pv);
pv += sizeof (gint);
}
else if (len == sizeof ("int64") - 1 &&
g_ascii_strncasecmp (pt, "int64", len) == 0) {
- lua_pushnumber (L, *(gint64 *)pv);
+ lua_pushinteger (L, *(gint64 *)pv);
pv += sizeof (gint64);
}
else if (len == sizeof ("bool") - 1 &&