Since LUA_GLOBALSINDEX is obsolete from Lua 5.2, use lua_getglobal function
authorNan Xiao <nan@chinadtrace.org>
Wed, 2 Aug 2017 02:04:44 +0000 (10:04 +0800)
committerBrenden Blanco <bblanco@gmail.com>
Fri, 11 Aug 2017 15:34:37 +0000 (08:34 -0700)
instead.

src/lua/src/main.c

index 25dab9a..bec3767 100644 (file)
@@ -68,7 +68,7 @@ static int report(lua_State *L, int status) {
 static int 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);
     return 1;