aboutsummaryrefslogtreecommitdiff
path: root/lauxlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lauxlib.c')
-rw-r--r--lauxlib.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lauxlib.c b/lauxlib.c
index 2d33adf6..7611db7f 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lauxlib.c,v 1.192 2009/09/28 12:36:40 roberto Exp roberto $ 2** $Id: lauxlib.c,v 1.193 2009/10/05 16:44:33 roberto Exp roberto $
3** Auxiliary functions for building Lua libraries 3** Auxiliary functions for building Lua libraries
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -97,7 +97,7 @@ static void pushfuncname (lua_State *L, lua_Debug *ar) {
97 lua_remove(L, -2); /* remove name */ 97 lua_remove(L, -2); /* remove name */
98 } 98 }
99 else 99 else
100 lua_pushliteral(L, "?"); /* C function or tail call */ 100 lua_pushliteral(L, "?");
101 } 101 }
102 else 102 else
103 lua_pushfstring(L, "function <%s:%d>", ar->short_src, ar->linedefined); 103 lua_pushfstring(L, "function <%s:%d>", ar->short_src, ar->linedefined);
@@ -133,12 +133,14 @@ LUALIB_API void luaL_traceback (lua_State *L, lua_State *L1,
133 level = numlevels - LEVELS2; /* and skip to last ones */ 133 level = numlevels - LEVELS2; /* and skip to last ones */
134 } 134 }
135 else { 135 else {
136 lua_getinfo(L1, "Sln", &ar); 136 lua_getinfo(L1, "Slnt", &ar);
137 lua_pushfstring(L, "\n\t%s:", ar.short_src); 137 lua_pushfstring(L, "\n\t%s:", ar.short_src);
138 if (ar.currentline > 0) 138 if (ar.currentline > 0)
139 lua_pushfstring(L, "%d:", ar.currentline); 139 lua_pushfstring(L, "%d:", ar.currentline);
140 lua_pushliteral(L, " in "); 140 lua_pushliteral(L, " in ");
141 pushfuncname(L, &ar); 141 pushfuncname(L, &ar);
142 if (ar.istailcall)
143 lua_pushliteral(L, "\n\t(...tail calls...)");
142 lua_concat(L, lua_gettop(L) - top); 144 lua_concat(L, lua_gettop(L) - top);
143 } 145 }
144 } 146 }