diff options
Diffstat (limited to 'lobject.h')
-rw-r--r-- | lobject.h | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.h,v 1.162 2003/11/18 14:55:11 roberto Exp roberto $ | 2 | ** $Id: lobject.h,v 2.1 2003/12/10 12:13:36 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 | */ |
@@ -99,9 +99,9 @@ typedef struct lua_TValue { | |||
99 | #define checkconsistency(obj) \ | 99 | #define checkconsistency(obj) \ |
100 | lua_assert(!iscollectable(obj) || (ttype(obj) == (obj)->value.gc->gch.tt)) | 100 | lua_assert(!iscollectable(obj) || (ttype(obj) == (obj)->value.gc->gch.tt)) |
101 | 101 | ||
102 | #define checkliveness(L,obj) \ | 102 | #define checkliveness(g,obj) \ |
103 | lua_assert(!iscollectable(obj) || \ | 103 | lua_assert(!iscollectable(obj) || \ |
104 | ((ttype(obj) == (obj)->value.gc->gch.tt) && !isdead(G(L), (obj)->value.gc))) | 104 | ((ttype(obj) == (obj)->value.gc->gch.tt) && !isdead(g, (obj)->value.gc))) |
105 | 105 | ||
106 | 106 | ||
107 | /* Macros to set values */ | 107 | /* Macros to set values */ |
@@ -122,32 +122,32 @@ typedef struct lua_TValue { | |||
122 | #define setsvalue(L,obj,x) \ | 122 | #define setsvalue(L,obj,x) \ |
123 | { TValue *i_o=(obj); \ | 123 | { TValue *i_o=(obj); \ |
124 | i_o->value.gc=cast(GCObject *, (x)); i_o->tt=LUA_TSTRING; \ | 124 | i_o->value.gc=cast(GCObject *, (x)); i_o->tt=LUA_TSTRING; \ |
125 | checkliveness(L,i_o); } | 125 | checkliveness(G(L),i_o); } |
126 | 126 | ||
127 | #define setuvalue(L,obj,x) \ | 127 | #define setuvalue(L,obj,x) \ |
128 | { TValue *i_o=(obj); \ | 128 | { TValue *i_o=(obj); \ |
129 | i_o->value.gc=cast(GCObject *, (x)); i_o->tt=LUA_TUSERDATA; \ | 129 | i_o->value.gc=cast(GCObject *, (x)); i_o->tt=LUA_TUSERDATA; \ |
130 | checkliveness(L,i_o); } | 130 | checkliveness(G(L),i_o); } |
131 | 131 | ||
132 | #define setthvalue(L,obj,x) \ | 132 | #define setthvalue(L,obj,x) \ |
133 | { TValue *i_o=(obj); \ | 133 | { TValue *i_o=(obj); \ |
134 | i_o->value.gc=cast(GCObject *, (x)); i_o->tt=LUA_TTHREAD; \ | 134 | i_o->value.gc=cast(GCObject *, (x)); i_o->tt=LUA_TTHREAD; \ |
135 | checkliveness(L,i_o); } | 135 | checkliveness(G(L),i_o); } |
136 | 136 | ||
137 | #define setclvalue(L,obj,x) \ | 137 | #define setclvalue(L,obj,x) \ |
138 | { TValue *i_o=(obj); \ | 138 | { TValue *i_o=(obj); \ |
139 | i_o->value.gc=cast(GCObject *, (x)); i_o->tt=LUA_TFUNCTION; \ | 139 | i_o->value.gc=cast(GCObject *, (x)); i_o->tt=LUA_TFUNCTION; \ |
140 | checkliveness(L,i_o); } | 140 | checkliveness(G(L),i_o); } |
141 | 141 | ||
142 | #define sethvalue(L,obj,x) \ | 142 | #define sethvalue(L,obj,x) \ |
143 | { TValue *i_o=(obj); \ | 143 | { TValue *i_o=(obj); \ |
144 | i_o->value.gc=cast(GCObject *, (x)); i_o->tt=LUA_TTABLE; \ | 144 | i_o->value.gc=cast(GCObject *, (x)); i_o->tt=LUA_TTABLE; \ |
145 | checkliveness(L,i_o); } | 145 | checkliveness(G(L),i_o); } |
146 | 146 | ||
147 | #define setptvalue(L,obj,x) \ | 147 | #define setptvalue(L,obj,x) \ |
148 | { TValue *i_o=(obj); \ | 148 | { TValue *i_o=(obj); \ |
149 | i_o->value.gc=cast(GCObject *, (x)); i_o->tt=LUA_TPROTO; \ | 149 | i_o->value.gc=cast(GCObject *, (x)); i_o->tt=LUA_TPROTO; \ |
150 | checkliveness(L,i_o); } | 150 | checkliveness(G(L),i_o); } |
151 | 151 | ||
152 | 152 | ||
153 | 153 | ||
@@ -155,7 +155,7 @@ typedef struct lua_TValue { | |||
155 | #define setobj(L,obj1,obj2) \ | 155 | #define setobj(L,obj1,obj2) \ |
156 | { const TValue *o2=(obj2); TValue *o1=(obj1); \ | 156 | { const TValue *o2=(obj2); TValue *o1=(obj1); \ |
157 | o1->tt=o2->tt; o1->value = o2->value; \ | 157 | o1->tt=o2->tt; o1->value = o2->value; \ |
158 | checkliveness(L,o1); } | 158 | checkliveness(G(L),o1); } |
159 | 159 | ||
160 | 160 | ||
161 | /* | 161 | /* |