diff options
-rw-r--r-- | lobject.h | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.h,v 2.119 2017/04/24 18:06:12 roberto Exp roberto $ | 2 | ** $Id: lobject.h,v 2.120 2017/04/30 20:43:26 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 | */ |
@@ -108,7 +108,7 @@ typedef union Value { | |||
108 | } Value; | 108 | } Value; |
109 | 109 | ||
110 | 110 | ||
111 | #define TValuefields Value value_; int tt_ | 111 | #define TValuefields Value value_; lu_byte tt_ |
112 | 112 | ||
113 | 113 | ||
114 | typedef struct lua_TValue { | 114 | typedef struct lua_TValue { |
@@ -258,7 +258,8 @@ typedef struct lua_TValue { | |||
258 | 258 | ||
259 | 259 | ||
260 | #define setobj(L,obj1,obj2) \ | 260 | #define setobj(L,obj1,obj2) \ |
261 | { TValue *io1=(obj1); *io1 = *(obj2); \ | 261 | { TValue *io1=(obj1); const TValue *io2=(obj2); \ |
262 | io1->value_ = io2->value_; io1->tt_ = io2->tt_; \ | ||
262 | (void)L; checkliveness(L,io1); } | 263 | (void)L; checkliveness(L,io1); } |
263 | 264 | ||
264 | 265 | ||
@@ -278,9 +279,8 @@ typedef struct lua_TValue { | |||
278 | /* to new object */ | 279 | /* to new object */ |
279 | #define setobj2n setobj | 280 | #define setobj2n setobj |
280 | #define setsvalue2n setsvalue | 281 | #define setsvalue2n setsvalue |
281 | 282 | /* to table */ | |
282 | /* to table (define it as an expression to be used in macros) */ | 283 | #define setobj2t setobj |
283 | #define setobj2t(L,o1,o2) ((void)L, *(o1)=*(o2), checkliveness(L,(o1))) | ||
284 | 284 | ||
285 | 285 | ||
286 | 286 | ||