diff options
Diffstat (limited to 'lfunc.c')
-rw-r--r-- | lfunc.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lfunc.c,v 1.72 2003/11/24 18:50:36 roberto Exp roberto $ | 2 | ** $Id: lfunc.c,v 1.73 2003/12/03 20:03:07 roberto Exp roberto $ |
3 | ** Auxiliary functions to manipulate prototypes and closures | 3 | ** Auxiliary functions to manipulate prototypes and closures |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -68,7 +68,8 @@ UpVal *luaF_findupval (lua_State *L, StkId level) { | |||
68 | void luaF_close (lua_State *L, StkId level) { | 68 | void luaF_close (lua_State *L, StkId level) { |
69 | UpVal *uv; | 69 | UpVal *uv; |
70 | while ((uv = ngcotouv(L->openupval)) != NULL && uv->v >= level) { | 70 | while ((uv = ngcotouv(L->openupval)) != NULL && uv->v >= level) { |
71 | setobj(&uv->value, uv->v); /* save current value (write barrier) */ | 71 | setobj(&uv->value, uv->v); |
72 | luaC_barrier(L, uv, uv->v); | ||
72 | uv->v = &uv->value; /* now current value lives here */ | 73 | uv->v = &uv->value; /* now current value lives here */ |
73 | L->openupval = uv->next; /* remove from `open' list */ | 74 | L->openupval = uv->next; /* remove from `open' list */ |
74 | luaC_link(L, valtogco(uv), LUA_TUPVAL); | 75 | luaC_link(L, valtogco(uv), LUA_TUPVAL); |