]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Another try to fix moonjit compatibility
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 21 Sep 2020 15:51:20 +0000 (16:51 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 21 Sep 2020 15:51:20 +0000 (16:51 +0100)
src/lua/lua_common.h

index 27f691a4cc8dc85af73731c01057a56c5741c3cb..fad82cf659f4dac78c1128af72880aee358e800e 100644 (file)
@@ -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;