aboutsummaryrefslogtreecommitdiff
path: root/lgc.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-04-06 10:08:56 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-04-06 10:08:56 -0300
commit2331e1beec01babf78ca09fea8701b5bb3c78d4c (patch)
treed6d5a05daf5338b383e7c5681503272318a62958 /lgc.c
parente4287da3a6b0b167da465fd449e5191b9ac9ef46 (diff)
downloadlua-2331e1beec01babf78ca09fea8701b5bb3c78d4c.tar.gz
lua-2331e1beec01babf78ca09fea8701b5bb3c78d4c.tar.bz2
lua-2331e1beec01babf78ca09fea8701b5bb3c78d4c.zip
small changes in 'luaC_upvalbarrier'
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