diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-08-16 15:54:30 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-08-16 15:54:30 +0100 |
commit | 30298909543453ebe969878f1406ee76ad148494 (patch) | |
tree | d1186e83ac42ca79d7926332ffc2a8cbdc3c3a6b /src/lua/lua_common.c | |
parent | da9a40771dc063e8773542a1c8d278f651d1b0fc (diff) | |
download | rspamd-30298909543453ebe969878f1406ee76ad148494.tar.gz rspamd-30298909543453ebe969878f1406ee76ad148494.zip |
[Minor] Add lua bit library if not luajit
Diffstat (limited to 'src/lua/lua_common.c')
-rw-r--r-- | src/lua/lua_common.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lua/lua_common.c b/src/lua/lua_common.c index cf909e021..5de0fa9ce 100644 --- a/src/lua/lua_common.c +++ b/src/lua/lua_common.c @@ -868,6 +868,10 @@ rspamd_lua_wipe_realloc (void *ud, return NULL; } +#ifndef WITH_LUAJIT +extern int luaopen_bit(lua_State *L); +#endif + lua_State * rspamd_lua_init (bool wipe_mem) { @@ -920,6 +924,10 @@ rspamd_lua_init (bool wipe_mem) luaopen_udp (L); luaopen_worker (L); luaopen_kann (L); +#ifndef WITH_LUAJIT + rspamd_lua_add_preload (L, "bit", luaopen_bit); + lua_settop (L, 0); +#endif luaL_newmetatable (L, "rspamd{ev_base}"); lua_pushstring (L, "class"); |