aboutsummaryrefslogtreecommitdiff
path: root/lgc.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-02-22 14:28:10 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-02-22 14:28:10 -0300
commit477ca2fe8ceaf79038972977915987adbef0e425 (patch)
tree6f682521c161dc6511ea257156c06ecac8a13db6 /lgc.c
parentc72ac048b989bea0f66f8532ab00a598da71e46d (diff)
downloadlua-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.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lgc.c b/lgc.c
index 3421bd8a..7cb3c18d 100644
--- a/lgc.c
+++ b/lgc.c
@@ -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)); }