aboutsummaryrefslogtreecommitdiff
path: root/src/luajit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/luajit.c')
-rw-r--r--src/luajit.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/luajit.c b/src/luajit.c
index 22628aaf..a9476372 100644
--- a/src/luajit.c
+++ b/src/luajit.c
@@ -106,19 +106,7 @@ static int traceback(lua_State *L)
106 return 1; /* Return non-string error object. */ 106 return 1; /* Return non-string error object. */
107 lua_remove(L, 1); /* Replace object by result of __tostring metamethod. */ 107 lua_remove(L, 1); /* Replace object by result of __tostring metamethod. */
108 } 108 }
109 lua_getfield(L, LUA_GLOBALSINDEX, "debug"); 109 luaL_traceback(L, L, lua_tostring(L, 1), 1);
110 if (!lua_istable(L, -1)) {
111 lua_pop(L, 1);
112 return 1;
113 }
114 lua_getfield(L, -1, "traceback");
115 if (!lua_isfunction(L, -1)) {
116 lua_pop(L, 2);
117 return 1;
118 }
119 lua_pushvalue(L, 1); /* Push error message. */
120 lua_pushinteger(L, 2); /* Skip this function and debug.traceback(). */
121 lua_call(L, 2, 1); /* Call debug.traceback(). */
122 return 1; 110 return 1;
123} 111}
124 112