diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-09-02 16:54:49 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-09-02 16:54:49 -0300 |
commit | 4964e7c8a0284a75a57cf591c3b3c77febaf40e6 (patch) | |
tree | d47c75cc6c36b87b8c837fe9487161c375d76d1c /lobject.h | |
parent | 2c670baf24115d9c59b5869b89873b93af8b779d (diff) | |
download | lua-4964e7c8a0284a75a57cf591c3b3c77febaf40e6.tar.gz lua-4964e7c8a0284a75a57cf591c3b3c77febaf40e6.tar.bz2 lua-4964e7c8a0284a75a57cf591c3b3c77febaf40e6.zip |
details
Diffstat (limited to 'lobject.h')
-rw-r--r-- | lobject.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.h,v 1.143 2002/08/16 14:45:55 roberto Exp roberto $ | 2 | ** $Id: lobject.h,v 1.144 2002/08/30 19:09:21 roberto Exp roberto $ |
3 | ** Type definitions for Lua objects | 3 | ** Type definitions for Lua objects |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -67,6 +67,7 @@ typedef struct lua_TObject { | |||
67 | 67 | ||
68 | /* Macros to access values */ | 68 | /* Macros to access values */ |
69 | #define ttype(o) ((o)->tt) | 69 | #define ttype(o) ((o)->tt) |
70 | #define gcvalue(o) check_exp(iscollectable(o), (o)->value.gc) | ||
70 | #define pvalue(o) check_exp(ttislightuserdata(o), (o)->value.p) | 71 | #define pvalue(o) check_exp(ttislightuserdata(o), (o)->value.p) |
71 | #define nvalue(o) check_exp(ttisnumber(o), (o)->value.n) | 72 | #define nvalue(o) check_exp(ttisnumber(o), (o)->value.n) |
72 | #define tsvalue(o) check_exp(ttisstring(o), &(o)->value.gc->ts) | 73 | #define tsvalue(o) check_exp(ttisstring(o), &(o)->value.gc->ts) |
@@ -113,6 +114,9 @@ typedef struct lua_TObject { | |||
113 | #define setnilvalue(obj) ((obj)->tt=LUA_TNIL) | 114 | #define setnilvalue(obj) ((obj)->tt=LUA_TNIL) |
114 | 115 | ||
115 | 116 | ||
117 | /* | ||
118 | ** for internal debug only | ||
119 | */ | ||
116 | #define checkconsistency(obj) \ | 120 | #define checkconsistency(obj) \ |
117 | lua_assert(!iscollectable(obj) || (ttype(obj) == (obj)->value.gc->gch.tt)) | 121 | lua_assert(!iscollectable(obj) || (ttype(obj) == (obj)->value.gc->gch.tt)) |
118 | 122 | ||