From 71e991f97940818ae4ba3b9acf62e7533de49f3a Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sun, 3 Dec 2017 12:48:04 +0000 Subject: [Minor] Rework initialization order to handle C modules --- src/lua/lua_common.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/lua/lua_common.h') 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 */ -- cgit v1.2.3