summaryrefslogtreecommitdiff
path: root/lobject.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-02-16 16:09:52 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-02-16 16:09:52 -0300
commit2aaf7394ad17180565423ce360d5faffb60f4e4f (patch)
tree32caa2d7b0079b4bc9b0ac392d216c5094a6433d /lobject.h
parentb3ce4505296253e6da1fa780c23e7ed012efc88e (diff)
downloadlua-github-2aaf7394ad17180565423ce360d5faffb60f4e4f.tar.gz
more and better tools (assertions & inspectors) to check incremental GC
Diffstat (limited to 'lobject.h')
-rw-r--r--lobject.h20
1 files changed, 10 insertions, 10 deletions
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); }
/*