diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-04-29 10:54:05 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-04-29 10:54:05 -0300 |
| commit | 9832f6b186be64423b73d9660e47ab2570a17a1b (patch) | |
| tree | 4979c7bf1b59959c7db8bfc538eb8c70a53f6ffd | |
| parent | 8e696dd14af4ff306db936dacae351dc4c5964b5 (diff) | |
| download | lua-9832f6b186be64423b73d9660e47ab2570a17a1b.tar.gz lua-9832f6b186be64423b73d9660e47ab2570a17a1b.tar.bz2 lua-9832f6b186be64423b73d9660e47ab2570a17a1b.zip | |
small bug
| -rw-r--r-- | lfunc.c | 6 |
1 files changed, 1 insertions, 5 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lfunc.c,v 2.8 2005/02/10 13:25:02 roberto Exp roberto $ | 2 | ** $Id: lfunc.c,v 2.9 2005/02/18 12:40:02 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 | */ |
| @@ -105,10 +105,6 @@ void luaF_close (lua_State *L, StkId level) { | |||
| 105 | else { | 105 | else { |
| 106 | unlinkupval(uv); | 106 | unlinkupval(uv); |
| 107 | setobj(L, &uv->u.value, uv->v); | 107 | setobj(L, &uv->u.value, uv->v); |
| 108 | if (isgray(o)) { | ||
| 109 | gray2black(o); /* closed upvalues are never gray */ | ||
| 110 | luaC_barrier(L, uv, &uv->u.value); | ||
| 111 | } | ||
| 112 | uv->v = &uv->u.value; /* now current value lives here */ | 108 | uv->v = &uv->u.value; /* now current value lives here */ |
| 113 | luaC_linkupval(L, uv); /* link upvalue into `gcroot' list */ | 109 | luaC_linkupval(L, uv); /* link upvalue into `gcroot' list */ |
| 114 | } | 110 | } |
