aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-04-05 11:24:07 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-04-05 11:24:07 -0300
commit83abbac946e965d9c36ca5054866e2693402318a (patch)
treea736ffcd78d1259e40cd472858285327214ee7ba
parenta25416a8d580c0dd72ae014f6a83b5205fbd11ce (diff)
downloadlua-83abbac946e965d9c36ca5054866e2693402318a.tar.gz
lua-83abbac946e965d9c36ca5054866e2693402318a.tar.bz2
lua-83abbac946e965d9c36ca5054866e2693402318a.zip
all names used internally by macros end with '_'
-rw-r--r--lobject.h56
1 files changed, 28 insertions, 28 deletions
diff --git a/lobject.h b/lobject.h
index 280e4b2c..ba19eb19 100644
--- a/lobject.h
+++ b/lobject.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lobject.h,v 2.46 2011/01/07 15:46:27 roberto Exp roberto $ 2** $Id: lobject.h,v 2.47 2011/02/28 17:32:10 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*/
@@ -145,61 +145,61 @@ typedef struct lua_TValue {
145#define setnilvalue(obj) ((obj)->tt_=LUA_TNIL) 145#define setnilvalue(obj) ((obj)->tt_=LUA_TNIL)
146 146
147#define setnvalue(obj,x) \ 147#define setnvalue(obj,x) \
148 { TValue *i_o=(obj); i_o->value_.n=(x); i_o->tt_=LUA_TNUMBER; } 148 { TValue *io_=(obj); io_->value_.n=(x); io_->tt_=LUA_TNUMBER; }
149 149
150#define setfvalue(obj,x) \ 150#define setfvalue(obj,x) \
151 { TValue *i_o=(obj); i_o->value_.f=(x); i_o->tt_=LUA_TLCF; } 151 { TValue *io_=(obj); io_->value_.f=(x); io_->tt_=LUA_TLCF; }
152 152
153#define changenvalue(o,x) check_exp((o)->tt_==LUA_TNUMBER, (o)->value_.n=(x)) 153#define changenvalue(o,x) check_exp((o)->tt_==LUA_TNUMBER, (o)->value_.n=(x))
154 154
155#define setpvalue(obj,x) \ 155#define setpvalue(obj,x) \
156 { TValue *i_o=(obj); i_o->value_.p=(x); i_o->tt_=LUA_TLIGHTUSERDATA; } 156 { TValue *io_=(obj); io_->value_.p=(x); io_->tt_=LUA_TLIGHTUSERDATA; }
157 157
158#define setbvalue(obj,x) \ 158#define setbvalue(obj,x) \
159 { TValue *i_o=(obj); i_o->value_.b=(x); i_o->tt_=LUA_TBOOLEAN; } 159 { TValue *io_=(obj); io_->value_.b=(x); io_->tt_=LUA_TBOOLEAN; }
160 160
161#define setgcovalue(L,obj,x) \ 161#define setgcovalue(L,obj,x) \
162 { TValue *i_o=(obj); GCObject *i_g=(x); \ 162 { TValue *io_=(obj); GCObject *i_g=(x); \
163 i_o->value_.gc=i_g; i_o->tt_=gch(i_g)->tt; } 163 io_->value_.gc=i_g; io_->tt_=gch(i_g)->tt; }
164 164
165#define setsvalue(L,obj,x) \ 165#define setsvalue(L,obj,x) \
166 { TValue *i_o=(obj); \ 166 { TValue *io_=(obj); \
167 i_o->value_.gc=cast(GCObject *, (x)); i_o->tt_=LUA_TSTRING; \ 167 io_->value_.gc=cast(GCObject *, (x)); io_->tt_=LUA_TSTRING; \
168 checkliveness(G(L),i_o); } 168 checkliveness(G(L),io_); }
169 169
170#define setuvalue(L,obj,x) \ 170#define setuvalue(L,obj,x) \
171 { TValue *i_o=(obj); \ 171 { TValue *io_=(obj); \
172 i_o->value_.gc=cast(GCObject *, (x)); i_o->tt_=LUA_TUSERDATA; \ 172 io_->value_.gc=cast(GCObject *, (x)); io_->tt_=LUA_TUSERDATA; \
173 checkliveness(G(L),i_o); } 173 checkliveness(G(L),io_); }
174 174
175#define setthvalue(L,obj,x) \ 175#define setthvalue(L,obj,x) \
176 { TValue *i_o=(obj); \ 176 { TValue *io_=(obj); \
177 i_o->value_.gc=cast(GCObject *, (x)); i_o->tt_=LUA_TTHREAD; \ 177 io_->value_.gc=cast(GCObject *, (x)); io_->tt_=LUA_TTHREAD; \
178 checkliveness(G(L),i_o); } 178 checkliveness(G(L),io_); }
179 179
180#define setclvalue(L,obj,x) \ 180#define setclvalue(L,obj,x) \
181 { TValue *i_o=(obj); \ 181 { TValue *io_=(obj); \
182 i_o->value_.gc=cast(GCObject *, (x)); i_o->tt_=LUA_TFUNCTION; \ 182 io_->value_.gc=cast(GCObject *, (x)); io_->tt_=LUA_TFUNCTION; \
183 checkliveness(G(L),i_o); } 183 checkliveness(G(L),io_); }
184 184
185#define sethvalue(L,obj,x) \ 185#define sethvalue(L,obj,x) \
186 { TValue *i_o=(obj); \ 186 { TValue *io_=(obj); \
187 i_o->value_.gc=cast(GCObject *, (x)); i_o->tt_=LUA_TTABLE; \ 187 io_->value_.gc=cast(GCObject *, (x)); io_->tt_=LUA_TTABLE; \
188 checkliveness(G(L),i_o); } 188 checkliveness(G(L),io_); }
189 189
190#define setptvalue(L,obj,x) \ 190#define setptvalue(L,obj,x) \
191 { TValue *i_o=(obj); \ 191 { TValue *io_=(obj); \
192 i_o->value_.gc=cast(GCObject *, (x)); i_o->tt_=LUA_TPROTO; \ 192 io_->value_.gc=cast(GCObject *, (x)); io_->tt_=LUA_TPROTO; \
193 checkliveness(G(L),i_o); } 193 checkliveness(G(L),io_); }
194 194
195#define setdeadvalue(obj) ((obj)->tt_=LUA_TDEADKEY) 195#define setdeadvalue(obj) ((obj)->tt_=LUA_TDEADKEY)
196 196
197 197
198 198
199#define setobj(L,obj1,obj2) \ 199#define setobj(L,obj1,obj2) \
200 { const TValue *o2=(obj2); TValue *o1=(obj1); \ 200 { const TValue *o2_=(obj2); TValue *o1_=(obj1); \
201 o1->value_ = o2->value_; o1->tt_=o2->tt_; \ 201 o1_->value_ = o2_->value_; o1_->tt_=o2_->tt_; \
202 checkliveness(G(L),o1); } 202 checkliveness(G(L),o1_); }
203 203
204 204
205/* 205/*