aboutsummaryrefslogtreecommitdiff
path: root/lstate.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-04-11 15:41:09 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-04-11 15:41:09 -0300
commita3d36fe283c09d4e56474da98f22d13162cc9fec (patch)
tree1f6e2ed56d50dc14aa669fa5f31a63755abd4553 /lstate.h
parent9569ad6b0ddcde43eb893d2cfe5bcdb715c0ff20 (diff)
downloadlua-a3d36fe283c09d4e56474da98f22d13162cc9fec.tar.gz
lua-a3d36fe283c09d4e56474da98f22d13162cc9fec.tar.bz2
lua-a3d36fe283c09d4e56474da98f22d13162cc9fec.zip
Upvalues collected like everything else (with mark-sweep) instead
of reference count (simpler and better for generational mode)
Diffstat (limited to 'lstate.h')
-rw-r--r--lstate.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lstate.h b/lstate.h
index b01859aa..dc74370b 100644
--- a/lstate.h
+++ b/lstate.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstate.h,v 2.135 2017/02/23 21:07:34 roberto Exp $ 2** $Id: lstate.h,v 2.136 2017/04/05 16:50:51 roberto Exp roberto $
3** Global State 3** Global State
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -224,6 +224,7 @@ union GCUnion {
224 struct Table h; 224 struct Table h;
225 struct Proto p; 225 struct Proto p;
226 struct lua_State th; /* thread */ 226 struct lua_State th; /* thread */
227 struct UpVal upv;
227}; 228};
228 229
229 230
@@ -240,6 +241,7 @@ union GCUnion {
240#define gco2t(o) check_exp((o)->tt == LUA_TTABLE, &((cast_u(o))->h)) 241#define gco2t(o) check_exp((o)->tt == LUA_TTABLE, &((cast_u(o))->h))
241#define gco2p(o) check_exp((o)->tt == LUA_TPROTO, &((cast_u(o))->p)) 242#define gco2p(o) check_exp((o)->tt == LUA_TPROTO, &((cast_u(o))->p))
242#define gco2th(o) check_exp((o)->tt == LUA_TTHREAD, &((cast_u(o))->th)) 243#define gco2th(o) check_exp((o)->tt == LUA_TTHREAD, &((cast_u(o))->th))
244#define gco2upv(o) check_exp((o)->tt == LUA_TUPVAL, &((cast_u(o))->upv))
243 245
244 246
245/* macro to convert a Lua object into a GCObject */ 247/* macro to convert a Lua object into a GCObject */