From 4df8800a01c7e44800ce59339c66b9257cd75c2a Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 10 Feb 2005 11:25:02 -0200 Subject: cleaner way to free all objects --- lfunc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lfunc.c') diff --git a/lfunc.c b/lfunc.c index 65d70cfb..d69f75dd 100644 --- a/lfunc.c +++ b/lfunc.c @@ -1,5 +1,5 @@ /* -** $Id: lfunc.c,v 2.5 2004/11/24 19:20:21 roberto Exp $ +** $Id: lfunc.c,v 2.7 2005/01/19 15:54:26 roberto Exp roberto $ ** Auxiliary functions to manipulate prototypes and closures ** See Copyright Notice in lua.h */ @@ -57,7 +57,7 @@ UpVal *luaF_findupval (lua_State *L, StkId level) { while ((p = ngcotouv(*pp)) != NULL && p->v >= level) { lua_assert(p->v != &p->u.value); if (p->v == level) { /* found a corresponding upvalue? */ - if (isdead(G(L), obj2gco(p))) /* is it dead? */ + if (isdead(g, obj2gco(p))) /* is it dead? */ changewhite(obj2gco(p)); /* ressurect it */ return p; } @@ -106,7 +106,7 @@ void luaF_close (lua_State *L, StkId level) { setobj(L, &uv->u.value, uv->v); if (isgray(o)) { gray2black(o); /* closed upvalues are never gray */ - luaC_barrier(L, uv, uv->v); + luaC_barrier(L, uv, &uv->u.value); } uv->v = &uv->u.value; /* now current value lives here */ luaC_linkupval(L, uv); /* link upvalue into `gcroot' list */ -- cgit v1.2.3-55-g6feb