mirror of
https://github.com/love2d/love.git
synced 2026-08-18 03:34:23 +02:00
Restore lua 5.2/5.3 compatibility (fixes #1408)
This commit is contained in:
@@ -879,4 +879,13 @@ Type *luax_type(lua_State *L, int idx)
|
||||
return Type::byName(luaL_checkstring(L, idx));
|
||||
}
|
||||
|
||||
int luax_resume(lua_State *L, int nargs)
|
||||
{
|
||||
#if LUA_VERSION_NUM >= 502
|
||||
return lua_resume(L, nullptr, nargs);
|
||||
#else
|
||||
return lua_resume(L, nargs);
|
||||
#endif
|
||||
}
|
||||
|
||||
} // love
|
||||
|
||||
@@ -676,6 +676,11 @@ int luax_catchexcept(lua_State *L, const T& func, const F& finallyfunc)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compatibility shim for lua_resume
|
||||
**/
|
||||
int luax_resume(lua_State *L, int nargs);
|
||||
|
||||
} // love
|
||||
|
||||
#endif // LOVE_RUNTIME_H
|
||||
|
||||
Reference in New Issue
Block a user