1
0
mirror of https://github.com/lua/lua.git synced 2025-01-14 05:43:00 +08:00

using macros ('rttype' and 'settt_') to access "private" field 'tt_'

This commit is contained in:
Roberto Ierusalimschy 2015-06-09 11:21:42 -03:00
parent cbef15f3ea
commit 2ecaf18138

View File

@ -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); }