diff options
Diffstat (limited to 'ldblib.c')
-rw-r--r-- | ldblib.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldblib.c,v 1.150 2015/11/19 19:16:22 roberto Exp roberto $ | 2 | ** $Id: ldblib.c,v 1.151 2015/11/23 11:29:43 roberto Exp roberto $ |
3 | ** Interface from Lua to its debug API | 3 | ** Interface from Lua to its debug API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -146,7 +146,7 @@ static int db_getinfo (lua_State *L) { | |||
146 | lua_Debug ar; | 146 | lua_Debug ar; |
147 | int arg; | 147 | int arg; |
148 | lua_State *L1 = getthread(L, &arg); | 148 | lua_State *L1 = getthread(L, &arg); |
149 | const char *options = luaL_optstring(L, arg+2, "flnStu"); | 149 | const char *options = luaL_optstring(L, arg+2, "flnSrtu"); |
150 | checkstack(L, L1, 3); | 150 | checkstack(L, L1, 3); |
151 | if (lua_isfunction(L, arg + 1)) { /* info about a function? */ | 151 | if (lua_isfunction(L, arg + 1)) { /* info about a function? */ |
152 | options = lua_pushfstring(L, ">%s", options); /* add '>' to 'options' */ | 152 | options = lua_pushfstring(L, ">%s", options); /* add '>' to 'options' */ |
@@ -180,6 +180,10 @@ static int db_getinfo (lua_State *L) { | |||
180 | settabss(L, "name", ar.name); | 180 | settabss(L, "name", ar.name); |
181 | settabss(L, "namewhat", ar.namewhat); | 181 | settabss(L, "namewhat", ar.namewhat); |
182 | } | 182 | } |
183 | if (strchr(options, 'r')) { | ||
184 | settabsi(L, "fTransfer", ar.fTransfer); | ||
185 | settabsi(L, "nTransfer", ar.nTransfer); | ||
186 | } | ||
183 | if (strchr(options, 't')) | 187 | if (strchr(options, 't')) |
184 | settabsb(L, "istailcall", ar.istailcall); | 188 | settabsb(L, "istailcall", ar.istailcall); |
185 | if (strchr(options, 'L')) | 189 | if (strchr(options, 'L')) |