summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2013-08-29 10:49:57 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2013-08-29 10:49:57 -0300
commit26629d0af16e8e7938cfb2f8c4c0ad70a027442c (patch)
treec9b114a3608e274460426ad4fe91e745f8416baf
parentb5e75fde4ec36b7db0a02cc8a353f8d3a769cfed (diff)
downloadlua-github-26629d0af16e8e7938cfb2f8c4c0ad70a027442c.tar.gz
details (a few casts moved from macro invocation to macro definition)
-rw-r--r--lgc.h6
-rw-r--r--ltable.c4
-rw-r--r--lvm.c6
3 files changed, 8 insertions, 8 deletions
diff --git a/lgc.h b/lgc.h
index cce4293b..978c7aca 100644
--- a/lgc.h
+++ b/lgc.h
@@ -1,5 +1,5 @@
/*
-** $Id: lgc.h,v 2.67 2013/08/27 18:53:35 roberto Exp roberto $
+** $Id: lgc.h,v 2.68 2013/08/27 20:04:00 roberto Exp roberto $
** Garbage Collector
** See Copyright Notice in lua.h
*/
@@ -117,7 +117,7 @@
#define luaC_barrierback(L,p,v) { \
if (iscollectable(v) && \
(nolocal(gcvalue(v)), isblack(obj2gco(p)) && iswhite(gcvalue(v)))) \
- luaC_barrierback_(L,p); }
+ luaC_barrierback_(L,obj2gco(p)); }
#define luaC_objbarrier(L,p,o) { \
if (nolocal(obj2gco(o)), isblack(obj2gco(p)) && iswhite(obj2gco(o))) \
@@ -125,7 +125,7 @@
#define luaC_objbarrierback(L,p,o) \
{ if (nolocal(obj2gco(o)), isblack(obj2gco(p)) && iswhite(obj2gco(o))) \
- luaC_barrierback_(L,p); }
+ luaC_barrierback_(L,obj2gco(p)); }
#define luaC_upvalbarrier(L,uv) \
{ if (iscollectable((uv)->v) && !upisopen(uv)) \
diff --git a/ltable.c b/ltable.c
index f7efdc59..a582feaa 100644
--- a/ltable.c
+++ b/ltable.c
@@ -1,5 +1,5 @@
/*
-** $Id: ltable.c,v 2.80 2013/08/27 20:04:00 roberto Exp roberto $
+** $Id: ltable.c,v 2.81 2013/08/28 18:30:26 roberto Exp roberto $
** Lua tables (hash)
** See Copyright Notice in lua.h
*/
@@ -461,7 +461,7 @@ TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key) {
}
}
setobj2t(L, gkey(mp), key);
- luaC_barrierback(L, obj2gco(t), key);
+ luaC_barrierback(L, t, key);
lua_assert(ttisnil(gval(mp)));
return gval(mp);
}
diff --git a/lvm.c b/lvm.c
index 5ebeb30d..cba196b0 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1,5 +1,5 @@
/*
-** $Id: lvm.c,v 2.178 2013/08/19 14:18:43 roberto Exp roberto $
+** $Id: lvm.c,v 2.179 2013/08/27 18:53:35 roberto Exp roberto $
** Lua virtual machine
** See Copyright Notice in lua.h
*/
@@ -145,7 +145,7 @@ void luaV_settable (lua_State *L, const TValue *t, TValue *key, StkId val) {
/* no metamethod and (now) there is an entry with given key */
setobj2t(L, oldval, val); /* assign new value to that entry */
invalidateTMcache(h);
- luaC_barrierback(L, obj2gco(h), val);
+ luaC_barrierback(L, h, val);
return;
}
/* else will try the metamethod */
@@ -914,7 +914,7 @@ void luaV_execute (lua_State *L) {
for (; n > 0; n--) {
TValue *val = ra+n;
luaH_setint(L, h, last--, val);
- luaC_barrierback(L, obj2gco(h), val);
+ luaC_barrierback(L, h, val);
}
L->top = ci->top; /* correct top (in case of previous open call) */
)