From ffff5d307dbb72131e87ad93f37bb18d27d6f3fd Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 24 Oct 2016 13:34:14 +0200 Subject: [PATCH] [Fix] Fix rspamd{session} class in Lua API --- src/lua/lua_common.c | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- 2.39.5