]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-lua: Don't include lua_resume_compat() for 5.1
authorSiavash Tavakoli <siavash.tavakoli@open-xchange.com>
Wed, 18 Aug 2021 12:54:39 +0000 (13:54 +0100)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Wed, 18 Aug 2021 13:05:35 +0000 (13:05 +0000)
lua_resume() is not supported in 5.1, so don't try to add a
compatibility function that fails compilation.

src/lib-lua/dlua-compat.c
src/lib-lua/dlua-compat.h

index 94f27bac4b39098295f1a3370be7114fb32b9d6b..c676186258434b57c099223834540ac38a1d4f0e 100644 (file)
@@ -147,7 +147,7 @@ lua_Integer lua_tointegerx(lua_State *L, int idx, int *isnum_r)
 }
 #endif
 
-#if LUA_VERSION_NUM < 504
+#if LUA_VERSION_NUM > 501 && LUA_VERSION_NUM < 504
 #  undef lua_resume
 int lua_resume_compat(lua_State *L, lua_State *from, int nargs, int *nresults)
 {
index 307ae467b8fa265ad57e4aa3899d97216fb10212..052bb838d4b921de5c468421f49209e5046a6ae9 100644 (file)
@@ -56,7 +56,7 @@ void lua_seti(lua_State *L, int index, lua_Integer n);
 lua_Integer lua_tointegerx(lua_State *L, int idx, int *isnum_r);
 #endif
 
-#if LUA_VERSION_NUM < 504
+#if LUA_VERSION_NUM > 501 && LUA_VERSION_NUM < 504
 /*
  * lua_resume() compatibility function. Lua 5.4 expects an extra "nresults"
  * argeument.