diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-06-20 17:41:46 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-06-20 17:41:46 -0300 |
commit | 3941af53adee868e2cccfb9b85783aba9ac311c1 (patch) | |
tree | 8b6295c8aefacf286c13c7d78b1d2a91421ce2b1 /ldo.c | |
parent | 5610fdd776edd0de71864f79d50b4526df861d75 (diff) | |
download | lua-3941af53adee868e2cccfb9b85783aba9ac311c1.tar.gz lua-3941af53adee868e2cccfb9b85783aba9ac311c1.tar.bz2 lua-3941af53adee868e2cccfb9b85783aba9ac311c1.zip |
first implementation of independent global table per function
Diffstat (limited to 'ldo.c')
-rw-r--r-- | ldo.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 1.181 2002/06/18 17:10:43 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 1.182 2002/06/18 17:42:52 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 | */ |
@@ -407,7 +407,7 @@ struct SParser { /* data to `f_parser' */ | |||
407 | static void f_parser (lua_State *L, void *ud) { | 407 | static void f_parser (lua_State *L, void *ud) { |
408 | struct SParser *p = cast(struct SParser *, ud); | 408 | struct SParser *p = cast(struct SParser *, ud); |
409 | Proto *tf = p->bin ? luaU_undump(L, p->z) : luaY_parser(L, p->z); | 409 | Proto *tf = p->bin ? luaU_undump(L, p->z) : luaY_parser(L, p->z); |
410 | Closure *cl = luaF_newLclosure(L, 0); | 410 | Closure *cl = luaF_newLclosure(L, 0, gt(L)); |
411 | cl->l.p = tf; | 411 | cl->l.p = tf; |
412 | setclvalue(L->top, cl); | 412 | setclvalue(L->top, cl); |
413 | incr_top(L); | 413 | incr_top(L); |
@@ -467,8 +467,8 @@ static void seterrorobj (lua_State *L, int errcode, TObject *m) { | |||
467 | 467 | ||
468 | 468 | ||
469 | void luaD_throw (lua_State *L, int errcode) { | 469 | void luaD_throw (lua_State *L, int errcode) { |
470 | seterrorobj(L, errcode, L->errorJmp->err); | ||
471 | if (L->errorJmp) { | 470 | if (L->errorJmp) { |
471 | seterrorobj(L, errcode, L->errorJmp->err); | ||
472 | L->errorJmp->status = errcode; | 472 | L->errorJmp->status = errcode; |
473 | longjmp(L->errorJmp->b, 1); | 473 | longjmp(L->errorJmp->b, 1); |
474 | } | 474 | } |