summaryrefslogtreecommitdiffstats
path: root/src/lua/lua_common.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-07-01 11:08:43 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-07-01 11:08:43 +0100
commit6bd388ae930900bef74532f810c4411650761868 (patch)
treebb164cd166ae1a43c2c7214d6961f0acda622ec8 /src/lua/lua_common.h
parent083e6ac5ce374e1e9759c7998dd04b9525333eb4 (diff)
downloadrspamd-6bd388ae930900bef74532f810c4411650761868.tar.gz
rspamd-6bd388ae930900bef74532f810c4411650761868.zip
[Minor] Add flags for rspamd_lua_parse_table_arguments
Diffstat (limited to 'src/lua/lua_common.h')
-rw-r--r--src/lua/lua_common.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lua/lua_common.h b/src/lua/lua_common.h
index 32b17a2fc..93bb5a28e 100644
--- a/src/lua/lua_common.h
+++ b/src/lua/lua_common.h
@@ -321,6 +321,10 @@ struct rspamd_async_session* lua_check_session (lua_State * L, gint pos);
struct ev_loop* lua_check_ev_base (lua_State * L, gint pos);
struct rspamd_dns_resolver * lua_check_dns_resolver (lua_State * L, gint pos);
+enum rspamd_lua_parse_arguments_flags {
+ RSPAMD_LUA_PARSE_ARGUMENTS_DEFAULT = 0,
+ RSPAMD_LUA_PARSE_ARGUMENTS_IGNORE_MISSING,
+};
/**
* Extract an arguments from lua table according to format string. Supported arguments are:
* [*]key=S|I|N|B|V|U{a-z};[key=...]
@@ -337,11 +341,14 @@ struct rspamd_dns_resolver * lua_check_dns_resolver (lua_State * L, gint pos);
* @param L lua state
* @param pos at which pos start extraction
* @param err error pointer
+ * @param how extraction type
* @param extraction_pattern static pattern
* @return TRUE if a table has been parsed
*/
gboolean rspamd_lua_parse_table_arguments (lua_State *L, gint pos,
- GError **err, const gchar *extraction_pattern, ...);
+ GError **err,
+ enum rspamd_lua_parse_arguments_flags how,
+ const gchar *extraction_pattern, ...);
gint rspamd_lua_traceback (lua_State *L);