From 74b0bb3a458adc8e0d845d67e0f9486679466d26 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 5 May 2011 16:42:25 -0300 Subject: [PATCH] macro 'checkconsistency' moved to this file, as it is used only here --- lgc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lgc.c b/lgc.c index 55101120..515cb76b 100644 --- a/lgc.c +++ b/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)); }