lua_resume() is not supported in 5.1, so don't try to add a
compatibility function that fails compilation.
}
#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)
{
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.