small changes in 'luaC_upvalbarrier'

This commit is contained in:
Roberto Ierusalimschy
2017-04-06 10:08:56 -03:00
parent e4287da3a6
commit 2331e1beec
5 changed files with 19 additions and 20 deletions

8
lgc.c
View File

@@ -186,13 +186,11 @@ void luaC_barrierback_ (lua_State *L, Table *t) {
** closures pointing to it. So, we assume that the object being assigned
** must be marked.
*/
void luaC_upvalbarrier_ (lua_State *L, UpVal *uv) {
void luaC_upvalbarrier_ (lua_State *L, GCObject *o) {
global_State *g = G(L);
GCObject *o = gcvalue(uv->v);
if (keepinvariant(g)) {
if (keepinvariant(g) && !isold(o)) {
markobject(g, o);
if (!isold(o))
setage(o, G_OLD0);
setage(o, G_OLD0);
}
}