aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lua/lua_common.c2
-rw-r--r--src/lua/lua_common.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/lua/lua_common.c b/src/lua/lua_common.c
index d53ebbc48..c658181ee 100644
--- a/src/lua/lua_common.c
+++ b/src/lua/lua_common.c
@@ -2479,6 +2479,7 @@ rspamd_lua_universal_pcall (lua_State *L, gint cbref, const gchar* strloc,
* - u - lua_userdata, argument - (const char * + void *) - classname + pointer
* - b - lua_boolean, argument - gboolean (not bool due to varargs promotion)
* - f - lua_function, argument - int - position of the function on stack (not lua_registry)
+ * - t - lua_text, argument - int - position of the lua_text on stack (not lua_registry)
*/
while (*argp) {
switch (*argp) {
@@ -2511,6 +2512,7 @@ rspamd_lua_universal_pcall (lua_State *L, gint cbref, const gchar* strloc,
nargs ++;
break;
case 'f':
+ case 't':
lua_pushvalue (L, va_arg (ap, gint));
nargs ++;
break;
diff --git a/src/lua/lua_common.h b/src/lua/lua_common.h
index 76680cbc5..cc4c9a9d4 100644
--- a/src/lua/lua_common.h
+++ b/src/lua/lua_common.h
@@ -594,6 +594,7 @@ gchar *rspamd_lua_get_module_name (lua_State *L);
* - u - lua_userdata, argument - (const char * + void *) - classname + pointer
* - b - lua_boolean, argument - gboolean (not bool due to varargs promotion)
* - f - lua_function, argument - int - position of the function on stack (not lua_registry)
+ * - t - lua_text, argument - int - position of the lua_text on stack (not lua_registry)
* @param L lua state
* @param cbref LUA_REGISTRY reference
* @param strloc where this function is called from