diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-01-08 18:00:20 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-01-08 18:00:20 -0200 |
commit | 1ebf109c53bd3100a1593acda68afcbe86f72f6c (patch) | |
tree | 53961d2e09b94bef8c19b555da06dc42e7985bbd | |
parent | f75be1cb28646e19f8a443a1dab4691f4d9112cf (diff) | |
download | lua-1ebf109c53bd3100a1593acda68afcbe86f72f6c.tar.gz lua-1ebf109c53bd3100a1593acda68afcbe86f72f6c.tar.bz2 lua-1ebf109c53bd3100a1593acda68afcbe86f72f6c.zip |
'setobj' must assing fields one by one, to allow trick of using
pad space in table keys
-rw-r--r-- | lobject.h | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.h,v 2.32 2009/11/06 17:09:27 roberto Exp roberto $ | 2 | ** $Id: lobject.h,v 2.33 2009/11/19 19:06:52 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 | */ |
@@ -169,8 +169,10 @@ typedef struct lua_TValue { | |||
169 | 169 | ||
170 | 170 | ||
171 | 171 | ||
172 | 172 | #define setobj(L,obj1,obj2) \ | |
173 | #define setobj(L,obj1,obj2) { *(obj1) = *(obj2); } | 173 | { const TValue *o2=(obj2); TValue *o1=(obj1); \ |
174 | o1->value_ = o2->value_; o1->tt_=o2->tt_; \ | ||
175 | checkliveness(G(L),o1); } | ||
174 | 176 | ||
175 | 177 | ||
176 | /* | 178 | /* |