mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
Make love compile against lua5.2
This commit is contained in:
@@ -486,6 +486,13 @@ int luax_getregistry(lua_State *L, Registry r)
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" int luax_typerror(lua_State *L, int narg, const char *tname)
|
||||
{
|
||||
const char *msg = lua_pushfstring(L, "%s expected, got %s",
|
||||
tname, luaL_typename(L, narg));
|
||||
return luaL_argerror(L, narg, msg);
|
||||
}
|
||||
|
||||
StringMap<Type, TYPE_MAX_ENUM>::Entry typeEntries[] =
|
||||
{
|
||||
{"Invalid", INVALID_ID},
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
// Lua
|
||||
extern "C" {
|
||||
#define LUA_COMPAT_ALL
|
||||
#include <lua.h>
|
||||
#include <lualib.h>
|
||||
#include <lauxlib.h>
|
||||
@@ -346,6 +347,10 @@ int luax_insistlove(lua_State *L, const char *k);
|
||||
**/
|
||||
int luax_getregistry(lua_State *L, Registry r);
|
||||
|
||||
extern "C" { // Also called from luasocket
|
||||
int luax_typerror(lua_State *L, int narg, const char *tname);
|
||||
}
|
||||
|
||||
/**
|
||||
* Like luax_totype, but causes an error if the value at idx is not Proxy,
|
||||
* or is not the specified type.
|
||||
|
||||
Reference in New Issue
Block a user