Fix compilation with lua 5.2 and 5.3

Mostly to have the lua53 "library" work with both lua 5.1 and lua 5.3.
Additionally fixes two other incompatibilities.

--HG--
branch : minor
This commit is contained in:
Bart van Strien
2017-09-25 10:27:12 +02:00
parent 2cde3a8227
commit 3278ea5580
3 changed files with 19 additions and 4 deletions
+1 -1
View File
@@ -135,7 +135,7 @@ int luax_traceback(lua_State *L)
if (!lua_isstring(L, 1)) // 'message' not a string?
return 1; // keep it intact
lua_getfield(L, LUA_GLOBALSINDEX, "debug");
lua_getglobal(L, "debug");
if (!lua_istable(L, -1))
{
lua_pop(L, 1);