diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-02-27 08:52:30 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-02-27 08:52:30 -0300 |
commit | 92f6e0c1bfb27cad95d99e99912e2e0c509dcc30 (patch) | |
tree | 1ab713c16652a5a4e667457041ce7364256a6b2c /lbaselib.c | |
parent | 5cd99b82b7fc11c527929e5e95f03767f6432d8e (diff) | |
download | lua-92f6e0c1bfb27cad95d99e99912e2e0c509dcc30.tar.gz lua-92f6e0c1bfb27cad95d99e99912e2e0c509dcc30.tar.bz2 lua-92f6e0c1bfb27cad95d99e99912e2e0c509dcc30.zip |
no-nonsense debug information about tail calls
Diffstat (limited to 'lbaselib.c')
-rw-r--r-- | lbaselib.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbaselib.c,v 1.122 2003/02/24 16:50:41 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.123 2003/02/24 16:54:20 roberto Exp roberto $ |
3 | ** Basic library | 3 | ** Basic library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -123,6 +123,9 @@ static void getfunc (lua_State *L) { | |||
123 | if (lua_getstack(L, level, &ar) == 0) | 123 | if (lua_getstack(L, level, &ar) == 0) |
124 | luaL_argerror(L, 1, "invalid level"); | 124 | luaL_argerror(L, 1, "invalid level"); |
125 | lua_getinfo(L, "f", &ar); | 125 | lua_getinfo(L, "f", &ar); |
126 | if (lua_isnil(L, -1)) | ||
127 | luaL_error(L, "cannot get/set environment (tail call at level %d)", | ||
128 | level); | ||
126 | } | 129 | } |
127 | } | 130 | } |
128 | 131 | ||