commit 2ecaf181381a2fa0a5586ae246ef51ffa4067f43
parent cbef15f3ea81a925abdcc11bf5870f3f0f1ce1cb
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Tue, 9 Jun 2015 11:21:17 -0300
using macros ('rttype' and 'settt_') to access "private" field 'tt_'
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lobject.h b/lobject.h
@@ -1,5 +1,5 @@
/*
-** $Id: lobject.h,v 2.109 2015/03/14 17:58:57 roberto Exp roberto $
+** $Id: lobject.h,v 2.110 2015/04/02 21:10:53 roberto Exp roberto $
** Type definitions for Lua objects
** See Copyright Notice in lua.h
*/
@@ -374,13 +374,13 @@ typedef union UUdata {
#define setuservalue(L,u,o) \
{ const TValue *io=(o); Udata *iu = (u); \
- iu->user_ = io->value_; iu->ttuv_ = io->tt_; \
+ iu->user_ = io->value_; iu->ttuv_ = rttype(io); \
checkliveness(G(L),io); }
#define getuservalue(L,u,o) \
{ TValue *io=(o); const Udata *iu = (u); \
- io->value_ = iu->user_; io->tt_ = iu->ttuv_; \
+ io->value_ = iu->user_; settt_(io, iu->ttuv_); \
checkliveness(G(L),io); }