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_xmlrpc.c | |
parent | a1be94b4c4b59de216e0b8b721a951b2325f7215 (diff) | |
download | rspamd-c2765b3eb3c3beb3d9f42dc061761df2e300904c.tar.gz rspamd-c2765b3eb3c3beb3d9f42dc061761df2e300904c.zip |
Use modules preload for lua.
Diffstat (limited to 'src/lua/lua_xmlrpc.c')
-rw-r--r-- | src/lua/lua_xmlrpc.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/lua/lua_xmlrpc.c b/src/lua/lua_xmlrpc.c index ebac5bc18..0d489fd1c 100644 --- a/src/lua/lua_xmlrpc.c +++ b/src/lua/lua_xmlrpc.c @@ -599,12 +599,18 @@ lua_xmlrpc_make_request (lua_State *L) return 1; } -gint -luaopen_xmlrpc (lua_State * L) +static gint +lua_load_xmlrpc (lua_State * L) { - - luaL_register (L, "rspamd_xmlrpc", xmlrpclib_m); + lua_newtable (L); + luaL_register (L, NULL, xmlrpclib_m); return 1; } +void +luaopen_xmlrpc (lua_State * L) +{ + rspamd_lua_add_preload (L, "rspamd_xmlrpc", lua_load_xmlrpc); +} + |