diff options
Diffstat (limited to 'lfunc.c')
-rw-r--r-- | lfunc.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lfunc.c,v 2.16 2009/09/30 15:38:37 roberto Exp roberto $ | 2 | ** $Id: lfunc.c,v 2.17 2009/11/26 11:39:20 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 | */ |
@@ -56,7 +56,7 @@ UpVal *luaF_findupval (lua_State *L, StkId level) { | |||
56 | GCObject **pp = &L->openupval; | 56 | GCObject **pp = &L->openupval; |
57 | UpVal *p; | 57 | UpVal *p; |
58 | UpVal *uv; | 58 | UpVal *uv; |
59 | while (*pp != NULL && (p = ngcotouv(*pp))->v >= level) { | 59 | while (*pp != NULL && (p = gco2uv(*pp))->v >= level) { |
60 | lua_assert(p->v != &p->u.value); | 60 | lua_assert(p->v != &p->u.value); |
61 | if (p->v == level) { /* found a corresponding upvalue? */ | 61 | if (p->v == level) { /* found a corresponding upvalue? */ |
62 | if (isdead(g, obj2gco(p))) /* is it dead? */ | 62 | if (isdead(g, obj2gco(p))) /* is it dead? */ |
@@ -97,7 +97,7 @@ void luaF_freeupval (lua_State *L, UpVal *uv) { | |||
97 | void luaF_close (lua_State *L, StkId level) { | 97 | void luaF_close (lua_State *L, StkId level) { |
98 | UpVal *uv; | 98 | UpVal *uv; |
99 | global_State *g = G(L); | 99 | global_State *g = G(L); |
100 | while (L->openupval != NULL && (uv = ngcotouv(L->openupval))->v >= level) { | 100 | while (L->openupval != NULL && (uv = gco2uv(L->openupval))->v >= level) { |
101 | GCObject *o = obj2gco(uv); | 101 | GCObject *o = obj2gco(uv); |
102 | lua_assert(!isblack(o) && uv->v != &uv->u.value); | 102 | lua_assert(!isblack(o) && uv->v != &uv->u.value); |
103 | L->openupval = uv->next; /* remove from `open' list */ | 103 | L->openupval = uv->next; /* remove from `open' list */ |