diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-02-22 14:28:10 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-02-22 14:28:10 -0300 |
commit | 477ca2fe8ceaf79038972977915987adbef0e425 (patch) | |
tree | 6f682521c161dc6511ea257156c06ecac8a13db6 /lgc.c | |
parent | c72ac048b989bea0f66f8532ab00a598da71e46d (diff) | |
download | lua-477ca2fe8ceaf79038972977915987adbef0e425.tar.gz lua-477ca2fe8ceaf79038972977915987adbef0e425.tar.bz2 lua-477ca2fe8ceaf79038972977915987adbef0e425.zip |
some reorganization in 'lobject.h'
(just moving stuff around)
Diffstat (limited to 'lgc.c')
-rw-r--r-- | lgc.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lgc.c,v 2.248 2018/02/19 16:02:25 roberto Exp roberto $ | 2 | ** $Id: lgc.c,v 2.248 2018/02/20 16:52:50 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 | */ |
@@ -79,6 +79,11 @@ | |||
79 | #define checkconsistency(obj) \ | 79 | #define checkconsistency(obj) \ |
80 | lua_longassert(!iscollectable(obj) || righttt(obj)) | 80 | lua_longassert(!iscollectable(obj) || righttt(obj)) |
81 | 81 | ||
82 | /* | ||
83 | ** Protected access to objects in values | ||
84 | */ | ||
85 | #define gcvalueN(o) (iscollectable(o) ? gcvalue(o) : NULL) | ||
86 | |||
82 | 87 | ||
83 | #define markvalue(g,o) { checkconsistency(o); \ | 88 | #define markvalue(g,o) { checkconsistency(o); \ |
84 | if (valiswhite(o)) reallymarkobject(g,gcvalue(o)); } | 89 | if (valiswhite(o)) reallymarkobject(g,gcvalue(o)); } |