aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-09-21 16:51:20 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-09-21 16:51:20 +0100
commit2c0c086cc150c26ac0a4271d97f662f4c365696c (patch)
treeb2138aebed3a9c460c81cd36fc7e3090108d1460 /src/lua
parentdfa2058809eb7277b54ced933e7f67dfd8d1dcb6 (diff)
downloadrspamd-2c0c086cc150c26ac0a4271d97f662f4c365696c.tar.gz
rspamd-2c0c086cc150c26ac0a4271d97f662f4c365696c.zip
[Minor] Another try to fix moonjit compatibility
Diffstat (limited to 'src/lua')
-rw-r--r--src/lua/lua_common.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lua/lua_common.h b/src/lua/lua_common.h
index 27f691a4c..fad82cf65 100644
--- a/src/lua/lua_common.h
+++ b/src/lua/lua_common.h
@@ -46,7 +46,8 @@ luaL_register (lua_State *L, const gchar *name, const struct luaL_reg *methods)
#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM == 501
-#ifndef MOONJIT_VERSION
+/* Special hack to work with moonjit of specific version */
+#if !defined(MOONJIT_VERSION) || (!defined(LUAJIT_VERSION_NUM) || LUAJIT_VERSION_NUM != 20200)
static inline int lua_absindex (lua_State *L, int i) {
if (i < 0 && i > LUA_REGISTRYINDEX)
i += lua_gettop(L) + 1;