@@ -486,6 +486,7 @@ INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/src" | |||
"${CMAKE_SOURCE_DIR}/contrib/librdns" | |||
"${CMAKE_SOURCE_DIR}/contrib/aho-corasick" | |||
"${CMAKE_SOURCE_DIR}/contrib/lc-btrie" | |||
"${CMAKE_SOURCE_DIR}/contrib/lpeg" | |||
"${CMAKE_BINARY_DIR}/src" #Stored in the binary dir | |||
"${CMAKE_BINARY_DIR}/src/libcryptobox") | |||
@@ -21,7 +21,7 @@ | |||
/* number of siblings for each tree */ | |||
const byte numsiblings[] = { | |||
0, 0, 0, /* char, set, any */ | |||
0, 0, /* true, false */ | |||
0, 0, /* true, false */ | |||
1, /* rep */ | |||
2, 2, /* seq, choice */ | |||
1, 1, /* not, and */ | |||
@@ -1280,8 +1280,6 @@ static struct luaL_Reg metareg[] = { | |||
{NULL, NULL} | |||
}; | |||
int luaopen_lpeg (lua_State *L); | |||
int luaopen_lpeg (lua_State *L) { | |||
luaL_newmetatable(L, PATTERN_T); | |||
lua_pushnumber(L, MAXBACK); /* initialize maximum backtracking */ |
@@ -1,4 +1,4 @@ | |||
/* | |||
/* | |||
** $Id: lptree.h,v 1.2 2013/03/24 13:51:12 roberto Exp $ | |||
*/ | |||
@@ -6,7 +6,7 @@ | |||
#define lptree_h | |||
#include "lptypes.h" | |||
#include "lptypes.h" | |||
/* | |||
@@ -69,7 +69,7 @@ extern const byte numsiblings[]; | |||
#define sib2(t) ((t) + (t)->u.ps) | |||
int luaopen_lpeg (lua_State *L); | |||
@@ -15,6 +15,7 @@ | |||
*/ | |||
#include "lua_common.h" | |||
#include "lua/global_functions.lua.h" | |||
#include "lptree.h" | |||
/* Lua module init function */ | |||
#define MODULE_INIT_FUNC "module_init" | |||
@@ -242,6 +243,7 @@ rspamd_lua_init () | |||
luaopen_fann (L); | |||
luaopen_sqlite3 (L); | |||
luaopen_cryptobox (L); | |||
luaopen_lpeg (L); | |||
rspamd_lua_add_preload (L, "ucl", luaopen_ucl); | |||