From 2aaf7394ad17180565423ce360d5faffb60f4e4f Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 16 Feb 2004 16:09:52 -0300 Subject: more and better tools (assertions & inspectors) to check incremental GC --- lobject.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'lobject.h') diff --git a/lobject.h b/lobject.h index fa5364c2..4cdb1701 100644 --- a/lobject.h +++ b/lobject.h @@ -1,5 +1,5 @@ /* -** $Id: lobject.h,v 1.162 2003/11/18 14:55:11 roberto Exp roberto $ +** $Id: lobject.h,v 2.1 2003/12/10 12:13:36 roberto Exp roberto $ ** Type definitions for Lua objects ** See Copyright Notice in lua.h */ @@ -99,9 +99,9 @@ typedef struct lua_TValue { #define checkconsistency(obj) \ lua_assert(!iscollectable(obj) || (ttype(obj) == (obj)->value.gc->gch.tt)) -#define checkliveness(L,obj) \ +#define checkliveness(g,obj) \ lua_assert(!iscollectable(obj) || \ - ((ttype(obj) == (obj)->value.gc->gch.tt) && !isdead(G(L), (obj)->value.gc))) + ((ttype(obj) == (obj)->value.gc->gch.tt) && !isdead(g, (obj)->value.gc))) /* Macros to set values */ @@ -122,32 +122,32 @@ typedef struct lua_TValue { #define setsvalue(L,obj,x) \ { TValue *i_o=(obj); \ i_o->value.gc=cast(GCObject *, (x)); i_o->tt=LUA_TSTRING; \ - checkliveness(L,i_o); } + checkliveness(G(L),i_o); } #define setuvalue(L,obj,x) \ { TValue *i_o=(obj); \ i_o->value.gc=cast(GCObject *, (x)); i_o->tt=LUA_TUSERDATA; \ - checkliveness(L,i_o); } + checkliveness(G(L),i_o); } #define setthvalue(L,obj,x) \ { TValue *i_o=(obj); \ i_o->value.gc=cast(GCObject *, (x)); i_o->tt=LUA_TTHREAD; \ - checkliveness(L,i_o); } + checkliveness(G(L),i_o); } #define setclvalue(L,obj,x) \ { TValue *i_o=(obj); \ i_o->value.gc=cast(GCObject *, (x)); i_o->tt=LUA_TFUNCTION; \ - checkliveness(L,i_o); } + checkliveness(G(L),i_o); } #define sethvalue(L,obj,x) \ { TValue *i_o=(obj); \ i_o->value.gc=cast(GCObject *, (x)); i_o->tt=LUA_TTABLE; \ - checkliveness(L,i_o); } + checkliveness(G(L),i_o); } #define setptvalue(L,obj,x) \ { TValue *i_o=(obj); \ i_o->value.gc=cast(GCObject *, (x)); i_o->tt=LUA_TPROTO; \ - checkliveness(L,i_o); } + checkliveness(G(L),i_o); } @@ -155,7 +155,7 @@ typedef struct lua_TValue { #define setobj(L,obj1,obj2) \ { const TValue *o2=(obj2); TValue *o1=(obj1); \ o1->tt=o2->tt; o1->value = o2->value; \ - checkliveness(L,o1); } + checkliveness(G(L),o1); } /* -- cgit v1.2.3-55-g6feb