summaryrefslogtreecommitdiffstats
path: root/src/lua/lua_common.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-09-05 17:26:56 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-09-05 17:26:56 +0100
commit83db59553e40e6eb9e6684e50c56dedb76f3cc72 (patch)
treefca6380bba48367fd9bd8a4e4b802e237595ada8 /src/lua/lua_common.h
parent8748c908b407a787ed5aab23cd0cf78f8d1ae4be (diff)
downloadrspamd-83db59553e40e6eb9e6684e50c56dedb76f3cc72.tar.gz
rspamd-83db59553e40e6eb9e6684e50c56dedb76f3cc72.zip
[Minor] Lua_text: Add ability to get a span from rspamd_text
Diffstat (limited to 'src/lua/lua_common.h')
-rw-r--r--src/lua/lua_common.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lua/lua_common.h b/src/lua/lua_common.h
index 40bbea772..507925e80 100644
--- a/src/lua/lua_common.h
+++ b/src/lua/lua_common.h
@@ -216,6 +216,9 @@ void rspamd_lua_task_push (lua_State *L, struct rspamd_task *task);
struct rspamd_lua_ip *lua_check_ip (lua_State *L, gint pos);
struct rspamd_lua_text *lua_check_text (lua_State *L, gint pos);
+/* Creates and *pushes* new rspamd text, data is copied if RSPAMD_TEXT_FLAG_OWN is in flags*/
+struct rspamd_lua_text *lua_new_text (lua_State *L, const gchar *start,
+ gsize len, guint flags);
struct rspamd_lua_regexp *lua_check_regexp (lua_State *L, gint pos);