aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_common.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-07-24 15:15:10 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-07-24 20:33:33 +0100
commite3748d403bf05f87ddc12d38869321557b99ad45 (patch)
treecf3374e7e66ebcfb8787b130a0f6d795daee0752 /src/lua/lua_common.c
parent53984d130b23f2c692ca521fda8c66c98bc021d2 (diff)
downloadrspamd-e3748d403bf05f87ddc12d38869321557b99ad45.tar.gz
rspamd-e3748d403bf05f87ddc12d38869321557b99ad45.zip
[Minor] Allow rspamd_text to be passed
Diffstat (limited to 'src/lua/lua_common.c')
-rw-r--r--src/lua/lua_common.c2
1 files changed, 2 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;