diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-12-03 12:48:04 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-12-03 16:55:30 +0000 |
commit | 71e991f97940818ae4ba3b9acf62e7533de49f3a (patch) | |
tree | ddf9334214a3a6e8fc7b84e090e2fd40375dec80 /src/lua/lua_common.h | |
parent | 2c89aaa9c94211f6fdb4f7afd1f0cdcf51f9ea2d (diff) | |
download | rspamd-71e991f97940818ae4ba3b9acf62e7533de49f3a.tar.gz rspamd-71e991f97940818ae4ba3b9acf62e7533de49f3a.zip |
[Minor] Rework initialization order to handle C modules
Diffstat (limited to 'src/lua/lua_common.h')
-rw-r--r-- | src/lua/lua_common.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lua/lua_common.h b/src/lua/lua_common.h index 9dbd8782b..1bc1e0bdf 100644 --- a/src/lua/lua_common.h +++ b/src/lua/lua_common.h @@ -48,6 +48,7 @@ luaL_register (lua_State *L, const gchar *name, const struct luaL_reg *methods) #define LUA_INTERFACE_DEF(class, name) { # name, lua_ ## class ## _ ## name } extern const luaL_reg null_reg[]; +static const char rspamd_modules_state_global[] = "rspamd_plugins_state"; #define RSPAMD_LUA_API_VERSION 12 @@ -159,6 +160,17 @@ gpointer rspamd_lua_check_class (lua_State *L, gint index, const gchar *name); */ lua_State *rspamd_lua_init (void); + +/** + * Sets field in a global variable + * @param L + * @param global_name + * @param field_name + * @param new_elt + */ +void +rspamd_table_push_global_elt (lua_State *L, const gchar *global_name, + const gchar *field_name, const gchar *new_elt); /** * Load and initialize lua plugins */ |