diff options
Diffstat (limited to 'lfunc.c')
-rw-r--r-- | lfunc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lfunc.c,v 2.28 2012/01/20 22:05:50 roberto Exp roberto $ | 2 | ** $Id: lfunc.c,v 2.29 2012/05/08 13:53:33 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 | */ |
@@ -52,12 +52,12 @@ UpVal *luaF_findupval (lua_State *L, StkId level) { | |||
52 | while (*pp != NULL && (p = gco2uv(*pp))->v >= level) { | 52 | while (*pp != NULL && (p = gco2uv(*pp))->v >= level) { |
53 | GCObject *o = obj2gco(p); | 53 | GCObject *o = obj2gco(p); |
54 | lua_assert(p->v != &p->u.value); | 54 | lua_assert(p->v != &p->u.value); |
55 | lua_assert(!isold(o) || isold(obj2gco(L))); | ||
55 | if (p->v == level) { /* found a corresponding upvalue? */ | 56 | if (p->v == level) { /* found a corresponding upvalue? */ |
56 | if (isdead(g, o)) /* is it dead? */ | 57 | if (isdead(g, o)) /* is it dead? */ |
57 | changewhite(o); /* resurrect it */ | 58 | changewhite(o); /* resurrect it */ |
58 | return p; | 59 | return p; |
59 | } | 60 | } |
60 | resetoldbit(o); /* may create a newer upval after this one */ | ||
61 | pp = &p->next; | 61 | pp = &p->next; |
62 | } | 62 | } |
63 | /* not found: create a new one */ | 63 | /* not found: create a new one */ |