diff --git a/luacompat.h b/luacompat.h index d9f8dc9..834a8f6 100644 --- a/luacompat.h +++ b/luacompat.h @@ -17,8 +17,6 @@ typedef struct { FILE *f; } luaL_Stream; -#define luaL_pushfail(L) lua_pushnil(L) - static inline void luaL_requiref(lua_State *L, const char *modname, lua_CFunction openf, int glb) { lua_pushstring(L, "_LOADED"); @@ -48,4 +46,9 @@ static inline void luaL_requiref(lua_State *L, const char *modname, lua_CFunctio } #endif + +#if LUA_VERSION_NUM < 503 +#define luaL_pushfail(L) lua_pushnil(L) +#endif + #endif