aboutsummaryrefslogtreecommitdiff
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-26629d0af16e8e7938cfb2f8c4c0ad70a027442c.tar.gz
lua-26629d0af16e8e7938cfb2f8c4c0ad70a027442c.tar.bz2
lua-26629d0af16e8e7938cfb2f8c4c0ad70a027442c.zip
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 @@
1/* 1/*
2** $Id: lgc.h,v 2.67 2013/08/27 18:53:35 roberto Exp roberto $ 2** $Id: lgc.h,v 2.68 2013/08/27 20:04:00 roberto Exp roberto $
3** Garbage Collector 3** Garbage Collector
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -117,7 +117,7 @@
117#define luaC_barrierback(L,p,v) { \ 117#define luaC_barrierback(L,p,v) { \
118 if (iscollectable(v) && \ 118 if (iscollectable(v) && \
119 (nolocal(gcvalue(v)), isblack(obj2gco(p)) && iswhite(gcvalue(v)))) \ 119 (nolocal(gcvalue(v)), isblack(obj2gco(p)) && iswhite(gcvalue(v)))) \
120 luaC_barrierback_(L,p); } 120 luaC_barrierback_(L,obj2gco(p)); }
121 121
122#define luaC_objbarrier(L,p,o) { \ 122#define luaC_objbarrier(L,p,o) { \
123 if (nolocal(obj2gco(o)), isblack(obj2gco(p)) && iswhite(obj2gco(o))) \ 123 if (nolocal(obj2gco(o)), isblack(obj2gco(p)) && iswhite(obj2gco(o))) \
@@ -125,7 +125,7 @@
125 125
126#define luaC_objbarrierback(L,p,o) \ 126#define luaC_objbarrierback(L,p,o) \
127 { if (nolocal(obj2gco(o)), isblack(obj2gco(p)) && iswhite(obj2gco(o))) \ 127 { if (nolocal(obj2gco(o)), isblack(obj2gco(p)) && iswhite(obj2gco(o))) \
128 luaC_barrierback_(L,p); } 128 luaC_barrierback_(L,obj2gco(p)); }
129 129
130#define luaC_upvalbarrier(L,uv) \ 130#define luaC_upvalbarrier(L,uv) \
131 { if (iscollectable((uv)->v) && !upisopen(uv)) \ 131 { 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 @@
1/* 1/*
2** $Id: ltable.c,v 2.80 2013/08/27 20:04:00 roberto Exp roberto $ 2** $Id: ltable.c,v 2.81 2013/08/28 18:30:26 roberto Exp roberto $
3** Lua tables (hash) 3** Lua tables (hash)
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -461,7 +461,7 @@ TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key) {
461 } 461 }
462 } 462 }
463 setobj2t(L, gkey(mp), key); 463 setobj2t(L, gkey(mp), key);
464 luaC_barrierback(L, obj2gco(t), key); 464 luaC_barrierback(L, t, key);
465 lua_assert(ttisnil(gval(mp))); 465 lua_assert(ttisnil(gval(mp)));
466 return gval(mp); 466 return gval(mp);
467} 467}
diff --git a/lvm.c b/lvm.c
index 5ebeb30d..cba196b0 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lvm.c,v 2.178 2013/08/19 14:18:43 roberto Exp roberto $ 2** $Id: lvm.c,v 2.179 2013/08/27 18:53:35 roberto Exp roberto $
3** Lua virtual machine 3** Lua virtual machine
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -145,7 +145,7 @@ void luaV_settable (lua_State *L, const TValue *t, TValue *key, StkId val) {
145 /* no metamethod and (now) there is an entry with given key */ 145 /* no metamethod and (now) there is an entry with given key */
146 setobj2t(L, oldval, val); /* assign new value to that entry */ 146 setobj2t(L, oldval, val); /* assign new value to that entry */
147 invalidateTMcache(h); 147 invalidateTMcache(h);
148 luaC_barrierback(L, obj2gco(h), val); 148 luaC_barrierback(L, h, val);
149 return; 149 return;
150 } 150 }
151 /* else will try the metamethod */ 151 /* else will try the metamethod */
@@ -914,7 +914,7 @@ void luaV_execute (lua_State *L) {
914 for (; n > 0; n--) { 914 for (; n > 0; n--) {
915 TValue *val = ra+n; 915 TValue *val = ra+n;
916 luaH_setint(L, h, last--, val); 916 luaH_setint(L, h, last--, val);
917 luaC_barrierback(L, obj2gco(h), val); 917 luaC_barrierback(L, h, val);
918 } 918 }
919 L->top = ci->top; /* correct top (in case of previous open call) */ 919 L->top = ci->top; /* correct top (in case of previous open call) */
920 ) 920 )