mirror of
https://github.com/lua/lua
synced 2024-11-22 12:51:30 +03:00
Detail (in asserts)
Macro 'checkconsistency' replaced by the similar 'checkliveness".
This commit is contained in:
parent
9cf3299faf
commit
68109afcdb
5
lgc.c
5
lgc.c
@ -80,16 +80,13 @@
|
||||
#define keyiswhite(n) (keyiscollectable(n) && iswhite(gckey(n)))
|
||||
|
||||
|
||||
#define checkconsistency(obj) \
|
||||
lua_longassert(!iscollectable(obj) || righttt(obj))
|
||||
|
||||
/*
|
||||
** Protected access to objects in values
|
||||
*/
|
||||
#define gcvalueN(o) (iscollectable(o) ? gcvalue(o) : NULL)
|
||||
|
||||
|
||||
#define markvalue(g,o) { checkconsistency(o); \
|
||||
#define markvalue(g,o) { checkliveness(g->mainthread,o); \
|
||||
if (valiswhite(o)) reallymarkobject(g,gcvalue(o)); }
|
||||
|
||||
#define markkey(g, n) { if keyiswhite(n) reallymarkobject(g,gckey(n)); }
|
||||
|
@ -96,7 +96,8 @@ typedef struct TValue {
|
||||
/*
|
||||
** Any value being manipulated by the program either is non
|
||||
** collectable, or the collectable object has the right tag
|
||||
** and it is not dead.
|
||||
** and it is not dead. The option 'L == NULL' allows other
|
||||
** macros using this one to be used where L is not available.
|
||||
*/
|
||||
#define checkliveness(L,obj) \
|
||||
((void)L, lua_longassert(!iscollectable(obj) || \
|
||||
|
Loading…
Reference in New Issue
Block a user