mirror of
https://github.com/lua/lua
synced 2025-01-07 18:12:00 +03:00
macro 'checkconsistency' moved to this file, as it is used only
here
This commit is contained in:
parent
e4076fe6d9
commit
74b0bb3a45
6
lgc.c
6
lgc.c
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lgc.c,v 2.107 2010/12/20 19:40:07 roberto Exp roberto $
|
||||
** $Id: lgc.c,v 2.108 2010/12/29 18:00:23 roberto Exp roberto $
|
||||
** Garbage Collector
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@ -73,6 +73,10 @@
|
||||
#define checkdeadkey(n) lua_assert(!ttisdeadkey(gkey(n)) || ttisnil(gval(n)))
|
||||
|
||||
|
||||
#define checkconsistency(obj) \
|
||||
lua_longassert(!iscollectable(obj) || righttt(obj))
|
||||
|
||||
|
||||
#define markvalue(g,o) { checkconsistency(o); \
|
||||
if (valiswhite(o)) reallymarkobject(g,gcvalue(o)); }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user