diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-07-18 09:17:54 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-07-18 09:17:54 -0300 |
commit | 56137d58ff7abe8cb22ee3469366e08888c84f28 (patch) | |
tree | 6769e3c2403a69cf3f0d6dbf6fb4acb7442367e0 /lobject.h | |
parent | 9aec500a2691d2b13c307d143868c8a4fab33220 (diff) | |
download | lua-56137d58ff7abe8cb22ee3469366e08888c84f28.tar.gz lua-56137d58ff7abe8cb22ee3469366e08888c84f28.tar.bz2 lua-56137d58ff7abe8cb22ee3469366e08888c84f28.zip |
added check for conversion 'obj2gco' (and corrections for small
problems detected by this check)
Diffstat (limited to 'lobject.h')
-rw-r--r-- | lobject.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.h,v 2.95 2014/07/17 17:09:50 roberto Exp roberto $ | 2 | ** $Id: lobject.h,v 2.96 2014/07/17 17:27:49 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 | */ |
@@ -210,12 +210,12 @@ typedef struct lua_TValue TValue; | |||
210 | 210 | ||
211 | #define setsvalue(L,obj,x) \ | 211 | #define setsvalue(L,obj,x) \ |
212 | { TValue *io = (obj); TString *x_ = (x); \ | 212 | { TValue *io = (obj); TString *x_ = (x); \ |
213 | val_(io).gc = obj2gco(x_); settt_(io, ctb(x_->tsv.tt)); \ | 213 | val_(io).gc = obj2gco(&x_->tsv); settt_(io, ctb(x_->tsv.tt)); \ |
214 | checkliveness(G(L),io); } | 214 | checkliveness(G(L),io); } |
215 | 215 | ||
216 | #define setuvalue(L,obj,x) \ | 216 | #define setuvalue(L,obj,x) \ |
217 | { TValue *io = (obj); Udata *x_ = (x); \ | 217 | { TValue *io = (obj); Udata *x_ = (x); \ |
218 | val_(io).gc = obj2gco(x_); settt_(io, ctb(LUA_TUSERDATA)); \ | 218 | val_(io).gc = obj2gco(&x_->uv); settt_(io, ctb(LUA_TUSERDATA)); \ |
219 | checkliveness(G(L),io); } | 219 | checkliveness(G(L),io); } |
220 | 220 | ||
221 | #define setthvalue(L,obj,x) \ | 221 | #define setthvalue(L,obj,x) \ |