diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-08-25 13:17:21 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-08-25 13:17:21 +0100 |
commit | c2765b3eb3c3beb3d9f42dc061761df2e300904c (patch) | |
tree | 0f5924f4fd821b16a258465d9dcb0068e5332bf2 /src/lua/lua_common.h | |
parent | a1be94b4c4b59de216e0b8b721a951b2325f7215 (diff) | |
download | rspamd-c2765b3eb3c3beb3d9f42dc061761df2e300904c.tar.gz rspamd-c2765b3eb3c3beb3d9f42dc061761df2e300904c.zip |
Use modules preload for lua.
Diffstat (limited to 'src/lua/lua_common.h')
-rw-r--r-- | src/lua/lua_common.h | 56 |
1 files changed, 31 insertions, 25 deletions
diff --git a/src/lua/lua_common.h b/src/lua/lua_common.h index 78bf80fdb..6594cdc2b 100644 --- a/src/lua/lua_common.h +++ b/src/lua/lua_common.h @@ -143,31 +143,37 @@ struct rspamd_lua_ip { /** * Open libraries functions */ -gint luaopen_message (lua_State *L); -gint luaopen_task (lua_State *L); -gint luaopen_config (lua_State *L); -gint luaopen_metric (lua_State *L); -gint luaopen_radix (lua_State *L); -gint luaopen_hash_table (lua_State *L); -gint luaopen_trie (lua_State * L); -gint luaopen_textpart (lua_State *L); -gint luaopen_mimepart (lua_State *L); -gint luaopen_image (lua_State *L); -gint luaopen_url (lua_State *L); -gint luaopen_classifier (lua_State *L); -gint luaopen_statfile (lua_State * L); -gint luaopen_glib_regexp (lua_State *L); -gint luaopen_cdb (lua_State *L); -gint luaopen_xmlrpc (lua_State * L); -gint luaopen_http (lua_State * L); -gint luaopen_redis (lua_State * L); -gint luaopen_upstream (lua_State * L); -gint luaopen_mempool (lua_State * L); -gint luaopen_session (lua_State * L); -gint luaopen_io_dispatcher (lua_State * L); -gint luaopen_dns_resolver (lua_State * L); -gint luaopen_rsa (lua_State * L); -gint luaopen_ip (lua_State * L); + +/** + * Add preload function + */ +void rspamd_lua_add_preload (lua_State *L, const gchar *name, lua_CFunction func); + +void luaopen_message (lua_State *L); +void luaopen_task (lua_State *L); +void luaopen_config (lua_State *L); +void luaopen_metric (lua_State *L); +void luaopen_radix (lua_State *L); +void luaopen_hash_table (lua_State *L); +void luaopen_trie (lua_State * L); +void luaopen_textpart (lua_State *L); +void luaopen_mimepart (lua_State *L); +void luaopen_image (lua_State *L); +void luaopen_url (lua_State *L); +void luaopen_classifier (lua_State *L); +void luaopen_statfile (lua_State * L); +void luaopen_glib_regexp (lua_State *L); +void luaopen_cdb (lua_State *L); +void luaopen_xmlrpc (lua_State * L); +void luaopen_http (lua_State * L); +void luaopen_redis (lua_State * L); +void luaopen_upstream (lua_State * L); +void luaopen_mempool (lua_State * L); +void luaopen_session (lua_State * L); +void luaopen_io_dispatcher (lua_State * L); +void luaopen_dns_resolver (lua_State * L); +void luaopen_rsa (lua_State * L); +void luaopen_ip (lua_State * L); gint rspamd_lua_call_filter (const gchar *function, struct rspamd_task *task); gint rspamd_lua_call_chain_filter (const gchar *function, |