[luacompat] luaL_pushfail() was actually introduced with Lua 5.3.

This commit is contained in:
Lorenzo Cogotti 2022-12-12 15:47:34 +01:00
parent 0f893a4682
commit abb3d56a45
1 changed files with 5 additions and 2 deletions

View File

@ -17,8 +17,6 @@ typedef struct {
FILE *f; FILE *f;
} luaL_Stream; } 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) static inline void luaL_requiref(lua_State *L, const char *modname, lua_CFunction openf, int glb)
{ {
lua_pushstring(L, "_LOADED"); lua_pushstring(L, "_LOADED");
@ -48,4 +46,9 @@ static inline void luaL_requiref(lua_State *L, const char *modname, lua_CFunctio
} }
#endif #endif
#if LUA_VERSION_NUM < 503
#define luaL_pushfail(L) lua_pushnil(L)
#endif
#endif #endif