aboutsummaryrefslogtreecommitdiff
path: root/lobject.h
diff options
context:
space:
mode:
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