]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
util-lua: add (wrapper) function to push integer to lua scripts
authorMats Klepsland <mats.klepsland@gmail.com>
Tue, 20 Oct 2015 13:59:48 +0000 (15:59 +0200)
committerVictor Julien <victor@inliniac.net>
Sun, 25 Sep 2016 20:35:34 +0000 (22:35 +0200)
src/util-lua.c
src/util-lua.h

index 54524826bd3a136f4660f02c882b66568d046df2..7f1d44348c471a195ba24876333369d001a2f15e 100644 (file)
@@ -271,4 +271,10 @@ int LuaPushStringBuffer(lua_State *luastate, const uint8_t *input, size_t input_
     return 1;
 }
 
+int LuaPushInteger(lua_State *luastate, lua_Integer n)
+{
+    lua_pushinteger(luastate, n);
+    return 1;
+}
+
 #endif /* HAVE_LUA */
index 492007a62af5e73f7929b80560dde75b41da113b..30431e74e8c25f4a8807605b732107407f77f476 100644 (file)
@@ -80,6 +80,8 @@ void LuaPrintStack(lua_State *state);
 
 int LuaPushStringBuffer(lua_State *luastate, const uint8_t *input, size_t input_len);
 
+int LuaPushInteger(lua_State *luastate, lua_Integer n);
+
 #endif /* HAVE_LUA */
 
 #endif /* __UTIL_LUA_H__ */