diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-10-24 13:34:14 +0200 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-10-24 13:34:37 +0200 |
commit | ffff5d307dbb72131e87ad93f37bb18d27d6f3fd (patch) | |
tree | df18d0d26c1fb37402442468245d17515833b984 /src/lua | |
parent | dae599e3677e38c5731e6a01692b082942c15ba8 (diff) | |
download | rspamd-ffff5d307dbb72131e87ad93f37bb18d27d6f3fd.tar.gz rspamd-ffff5d307dbb72131e87ad93f37bb18d27d6f3fd.zip |
[Fix] Fix rspamd{session} class in Lua API
Diffstat (limited to 'src/lua')
-rw-r--r-- | src/lua/lua_common.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lua/lua_common.c b/src/lua/lua_common.c index f899f68ed..37581079a 100644 --- a/src/lua/lua_common.c +++ b/src/lua/lua_common.c @@ -290,6 +290,12 @@ rspamd_lua_init () lua_rawset (L, -3); lua_pop (L, 1); + luaL_newmetatable (L, "rspamd{session}"); + lua_pushstring (L, "class"); + lua_pushstring (L, "rspamd{session}"); + lua_rawset (L, -3); + lua_pop (L, 1); + rspamd_lua_new_class (L, "rspamd{worker}", worker_reg); rspamd_lua_add_preload (L, "ucl", luaopen_ucl); |