summaryrefslogtreecommitdiff
path: root/lgc.c
diff options
context:
space:
mode:
Diffstat (limited to 'lgc.c')
-rw-r--r--lgc.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lgc.c b/lgc.c
index 8d185cd7..73114300 100644
--- a/lgc.c
+++ b/lgc.c
@@ -186,13 +186,11 @@ void luaC_barrierback_ (lua_State *L, Table *t) {
186** closures pointing to it. So, we assume that the object being assigned 186** closures pointing to it. So, we assume that the object being assigned
187** must be marked. 187** must be marked.
188*/ 188*/
189void luaC_upvalbarrier_ (lua_State *L, UpVal *uv) { 189void luaC_upvalbarrier_ (lua_State *L, GCObject *o) {
190 global_State *g = G(L); 190 global_State *g = G(L);
191 GCObject *o = gcvalue(uv->v); 191 if (keepinvariant(g) && !isold(o)) {
192 if (keepinvariant(g)) {
193 markobject(g, o); 192 markobject(g, o);
194 if (!isold(o)) 193 setage(o, G_OLD0);
195 setage(o, G_OLD0);
196 } 194 }
197} 195}
198 196