diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-02-16 16:09:52 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-02-16 16:09:52 -0300 |
commit | 2aaf7394ad17180565423ce360d5faffb60f4e4f (patch) | |
tree | 32caa2d7b0079b4bc9b0ac392d216c5094a6433d /lobject.h | |
parent | b3ce4505296253e6da1fa780c23e7ed012efc88e (diff) | |
download | lua-github-2aaf7394ad17180565423ce360d5faffb60f4e4f.tar.gz |
more and better tools (assertions & inspectors) to check incremental GC
Diffstat (limited to 'lobject.h')
-rw-r--r-- | lobject.h | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -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); } /* |