aboutsummaryrefslogtreecommitdiff
path: root/lobject.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-09-02 16:54:49 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-09-02 16:54:49 -0300
commit4964e7c8a0284a75a57cf591c3b3c77febaf40e6 (patch)
treed47c75cc6c36b87b8c837fe9487161c375d76d1c /lobject.h
parent2c670baf24115d9c59b5869b89873b93af8b779d (diff)
downloadlua-4964e7c8a0284a75a57cf591c3b3c77febaf40e6.tar.gz
lua-4964e7c8a0284a75a57cf591c3b3c77febaf40e6.tar.bz2
lua-4964e7c8a0284a75a57cf591c3b3c77febaf40e6.zip
details
Diffstat (limited to 'lobject.h')
-rw-r--r--lobject.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/lobject.h b/lobject.h
index af47f57f..f80acfee 100644
--- a/lobject.h
+++ b/lobject.h
@@ -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