diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-12-08 13:26:09 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-12-08 13:26:09 -0200 |
commit | ab4a890d04acf63fa3552af2c7d821b8360e42d4 (patch) | |
tree | 637a44220a2fd7a10ac183d1e5726b6de29a9529 /lauxlib.c | |
parent | 64e25a61866f431021889c55974617d60f2459be (diff) | |
download | lua-ab4a890d04acf63fa3552af2c7d821b8360e42d4.tar.gz lua-ab4a890d04acf63fa3552af2c7d821b8360e42d4.tar.bz2 lua-ab4a890d04acf63fa3552af2c7d821b8360e42d4.zip |
use 'namewhat' when building a traceback
Diffstat (limited to 'lauxlib.c')
-rw-r--r-- | lauxlib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lauxlib.c,v 1.274 2014/11/12 13:32:27 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.275 2014/11/21 12:17:58 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 | */ |
@@ -84,7 +84,7 @@ static int pushglobalfuncname (lua_State *L, lua_Debug *ar) { | |||
84 | 84 | ||
85 | static void pushfuncname (lua_State *L, lua_Debug *ar) { | 85 | static void pushfuncname (lua_State *L, lua_Debug *ar) { |
86 | if (*ar->namewhat != '\0') /* is there a name? */ | 86 | if (*ar->namewhat != '\0') /* is there a name? */ |
87 | lua_pushfstring(L, "function '%s'", ar->name); | 87 | lua_pushfstring(L, "%s '%s'", ar->namewhat, ar->name); |
88 | else if (*ar->what == 'm') /* main? */ | 88 | else if (*ar->what == 'm') /* main? */ |
89 | lua_pushliteral(L, "main chunk"); | 89 | lua_pushliteral(L, "main chunk"); |
90 | else if (*ar->what == 'C') { | 90 | else if (*ar->what == 'C') { |