Make love compile against lua5.2

This commit is contained in:
Bart van Strien
2013-07-10 16:02:52 +02:00
parent 14ca401158
commit f5603b0291
6 changed files with 25 additions and 10 deletions
+7
View File
@@ -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},
+5
View File
@@ -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.