aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_expression.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-03-17 23:29:27 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-03-17 23:29:49 +0000
commit29a5425adb186ac73ec2b7b436cb9e87be762adb (patch)
tree110aefcee0fcb10b8c8bf6d4dd18b353d3b8c98d /src/lua/lua_expression.c
parenta6e30390f384a5dd6446542436d45fd983af565b (diff)
downloadrspamd-29a5425adb186ac73ec2b7b436cb9e87be762adb.tar.gz
rspamd-29a5425adb186ac73ec2b7b436cb9e87be762adb.zip
Fix more issues in expressions parser.
Diffstat (limited to 'src/lua/lua_expression.c')
-rw-r--r--src/lua/lua_expression.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lua/lua_expression.c b/src/lua/lua_expression.c
index 55b0c1556..284fccb65 100644
--- a/src/lua/lua_expression.c
+++ b/src/lua/lua_expression.c
@@ -64,6 +64,7 @@ LUA_FUNCTION_DEF (expr, to_string);
static const struct luaL_reg exprlib_m[] = {
LUA_INTERFACE_DEF (expr, to_string),
+ {"__tostring", lua_expr_to_string},
{NULL, NULL}
};
@@ -231,6 +232,7 @@ lua_expr_create (lua_State *L)
}
pe = lua_newuserdata (L, sizeof (struct lua_expression *));
+ rspamd_lua_setclass (L, "rspamd{expr}", -1);
*pe = e;
lua_pushnil (L);
}