diff options
Diffstat (limited to 'ldo.c')
| -rw-r--r-- | ldo.c | 10 |
1 files changed, 9 insertions, 1 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldo.c,v 1.179 2002/06/03 20:12:50 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 1.180 2002/06/18 15:19:27 roberto Exp roberto $ |
| 3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -501,5 +501,13 @@ int luaD_runprotected (lua_State *L, Pfunc f, TObject *ud) { | |||
| 501 | return lj.status; | 501 | return lj.status; |
| 502 | } | 502 | } |
| 503 | 503 | ||
| 504 | |||
| 505 | int luaD_isprotected (lua_State *L, CallInfo *ci) { | ||
| 506 | struct lua_longjmp *l; | ||
| 507 | for (l = L->errorJmp; l; l = l->previous) | ||
| 508 | if (l->ci+1 == ci) return 1; | ||
| 509 | return 0; | ||
| 510 | } | ||
| 511 | |||
| 504 | /* }====================================================== */ | 512 | /* }====================================================== */ |
| 505 | 513 | ||
