aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_common.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2023-02-01 17:32:24 +0000
committerVsevolod Stakhov <vsevolod@rspamd.com>2023-02-01 17:32:24 +0000
commit6a7407939e6772972112a4e6c3cc820b1e7c817d (patch)
tree6af9df36c72c305fc43738bfa924cc3b25024b4f /src/lua/lua_common.h
parentf49186916a561ae1686f6a23dd3b14938b79ed53 (diff)
downloadrspamd-6a7407939e6772972112a4e6c3cc820b1e7c817d.tar.gz
rspamd-6a7407939e6772972112a4e6c3cc820b1e7c817d.zip
[Fix] Finally get rid of RSPAMD_USE_47BIT_LIGHTUSERDATA_HACK
Diffstat (limited to 'src/lua/lua_common.h')
-rw-r--r--src/lua/lua_common.h22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/lua/lua_common.h b/src/lua/lua_common.h
index a6e98a4ba..2fea11f4a 100644
--- a/src/lua/lua_common.h
+++ b/src/lua/lua_common.h
@@ -93,13 +93,6 @@ static inline void lua_rawsetp (lua_State *L, int i, const void *p) {
extern const luaL_reg null_reg[];
#define RSPAMD_LUA_API_VERSION 12
-
-/* Locked lua state with mutex */
-struct lua_locked_state {
- lua_State *L;
- rspamd_mutex_t *m;
-};
-
/**
* Lua IP address structure
*/
@@ -225,6 +218,12 @@ gpointer rspamd_lua_check_class (lua_State *L, gint index, const gchar *name);
*/
lua_State *rspamd_lua_init (bool wipe_mem);
+/**
+ * Close lua_state and free remainders
+ * @param L
+ */
+void rspamd_lua_close (lua_State *L);
+
void rspamd_lua_start_gc (struct rspamd_config *cfg);
/**
@@ -244,15 +243,6 @@ rspamd_plugins_table_push_elt (lua_State *L, const gchar *field_name,
gboolean
rspamd_init_lua_filters (struct rspamd_config *cfg, bool force_load, bool strict);
-/**
-* Initialize new locked lua_State structure
-*/
-struct lua_locked_state *rspamd_init_lua_locked (struct rspamd_config *cfg);
-
-/**
-* Free locked state structure
-*/
-void rspamd_free_lua_locked (struct lua_locked_state *st);
/**
* Push lua ip address