From e1a8ed50131891516f5da6e22aae69a306147d38 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 26 Jul 2012 21:50:13 +0400 Subject: * Add lua worker type and lua worker bindings. * Add lua utility library for basic utils. * Fixes lua_buffer code. Fix lua loading error. Added some other lua utility functions. --- src/lua/lua_upstream.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/lua/lua_upstream.c') diff --git a/src/lua/lua_upstream.c b/src/lua/lua_upstream.c index f9e74e027..6780a756a 100644 --- a/src/lua/lua_upstream.c +++ b/src/lua/lua_upstream.c @@ -505,6 +505,8 @@ luaopen_upstream (lua_State * L) luaL_openlib (L, NULL, upstream_list_m, 0); luaL_openlib (L, "upstream_list", upstream_list_f, 0); + lua_pop (L, 1); /* remove metatable from stack */ + luaL_newmetatable (L, "rspamd{upstream}"); lua_pushstring (L, "__index"); lua_pushvalue (L, -2); @@ -517,5 +519,7 @@ luaopen_upstream (lua_State * L) luaL_openlib (L, NULL, upstream_m, 0); luaL_openlib (L, "upstream", upstream_f, 0); + lua_pop (L, 1); /* remove metatable from stack */ + return 1; } -- cgit v1.2.3