aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_common.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-04-07 22:39:37 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-04-07 22:39:37 +0100
commitf29ecb6a74cd7aea7c67682b5b6172c4094253dd (patch)
treeee86889dff5d06de6b6cdc4dbc4980af540e6b12 /src/lua/lua_common.h
parentcdd553cc27cc230662025663e353a9a7c8ce5e8a (diff)
downloadrspamd-f29ecb6a74cd7aea7c67682b5b6172c4094253dd.tar.gz
rspamd-f29ecb6a74cd7aea7c67682b5b6172c4094253dd.zip
Use rspamd{text} for storing task content.
Diffstat (limited to 'src/lua/lua_common.h')
-rw-r--r--src/lua/lua_common.h23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/lua/lua_common.h b/src/lua/lua_common.h
index 07ed77c14..9299bd651 100644
--- a/src/lua/lua_common.h
+++ b/src/lua/lua_common.h
@@ -55,6 +55,19 @@ struct lua_locked_state {
rspamd_mutex_t *m;
};
+/**
+ * Lua IP address structure
+ */
+struct rspamd_lua_ip {
+ rspamd_inet_addr_t *addr;
+};
+
+struct rspamd_lua_text {
+ const gchar *start;
+ gsize len;
+};
+
+
/* Common utility functions */
/**
@@ -132,6 +145,8 @@ 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);
+
/**
* Check for task at the specified position
*/
@@ -146,14 +161,6 @@ void rspamd_lua_ip_push_fromstring (lua_State *L, const gchar *ip_str);
* Create type error
*/
int rspamd_lua_typerror (lua_State *L, int narg, const char *tname);
-
-/**
- * Lua IP address structure
- */
-struct rspamd_lua_ip {
- rspamd_inet_addr_t *addr;
-};
-
/**
* Open libraries functions
*/