diff options
Diffstat (limited to 'lfunc.c')
-rw-r--r-- | lfunc.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lfunc.c,v 2.38 2013/09/11 12:26:14 roberto Exp roberto $ | 2 | ** $Id: lfunc.c,v 2.39 2014/02/13 12:11:34 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,12 +56,12 @@ UpVal *luaF_findupval (lua_State *L, StkId level) { | |||
56 | lua_assert(upisopen(p)); | 56 | lua_assert(upisopen(p)); |
57 | if (p->v == level) /* found a corresponding upvalue? */ | 57 | if (p->v == level) /* found a corresponding upvalue? */ |
58 | return p; /* return it */ | 58 | return p; /* return it */ |
59 | pp = &p->u.op.next; | 59 | pp = &p->u.open.next; |
60 | } | 60 | } |
61 | /* not found: create a new one */ | 61 | /* not found: create a new one */ |
62 | uv = luaM_new(L, UpVal); | 62 | uv = luaM_new(L, UpVal); |
63 | uv->refcount = 0; | 63 | uv->refcount = 0; |
64 | uv->u.op.next = *pp; | 64 | uv->u.open.next = *pp; |
65 | *pp = uv; | 65 | *pp = uv; |
66 | uv->v = level; /* current value lives in the stack */ | 66 | uv->v = level; /* current value lives in the stack */ |
67 | return uv; | 67 | return uv; |
@@ -72,7 +72,7 @@ void luaF_close (lua_State *L, StkId level) { | |||
72 | UpVal *uv; | 72 | UpVal *uv; |
73 | while (L->openupval != NULL && (uv = L->openupval)->v >= level) { | 73 | while (L->openupval != NULL && (uv = L->openupval)->v >= level) { |
74 | lua_assert(upisopen(uv)); | 74 | lua_assert(upisopen(uv)); |
75 | L->openupval = uv->u.op.next; /* remove from `open' list */ | 75 | L->openupval = uv->u.open.next; /* remove from `open' list */ |
76 | if (uv->refcount == 0) /* no references? */ | 76 | if (uv->refcount == 0) /* no references? */ |
77 | luaM_free(L, uv); /* free upvalue */ | 77 | luaM_free(L, uv); /* free upvalue */ |
78 | else { | 78 | else { |