aboutsummaryrefslogtreecommitdiff
path: root/lobject.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2015-06-09 11:21:42 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2015-06-09 11:21:42 -0300
commit2ecaf181381a2fa0a5586ae246ef51ffa4067f43 (patch)
treef0620abe03ea19a08018132150a8a782e8fb5758 /lobject.h
parentcbef15f3ea81a925abdcc11bf5870f3f0f1ce1cb (diff)
downloadlua-2ecaf181381a2fa0a5586ae246ef51ffa4067f43.tar.gz
lua-2ecaf181381a2fa0a5586ae246ef51ffa4067f43.tar.bz2
lua-2ecaf181381a2fa0a5586ae246ef51ffa4067f43.zip
using macros ('rttype' and 'settt_') to access "private" field 'tt_'
Diffstat (limited to 'lobject.h')
-rw-r--r--lobject.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lobject.h b/lobject.h
index c7025d6b..2f63f718 100644
--- a/lobject.h
+++ b/lobject.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lobject.h,v 2.109 2015/03/14 17:58:57 roberto Exp roberto $ 2** $Id: lobject.h,v 2.110 2015/04/02 21:10:53 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*/
@@ -374,13 +374,13 @@ typedef union UUdata {
374 374
375#define setuservalue(L,u,o) \ 375#define setuservalue(L,u,o) \
376 { const TValue *io=(o); Udata *iu = (u); \ 376 { const TValue *io=(o); Udata *iu = (u); \
377 iu->user_ = io->value_; iu->ttuv_ = io->tt_; \ 377 iu->user_ = io->value_; iu->ttuv_ = rttype(io); \
378 checkliveness(G(L),io); } 378 checkliveness(G(L),io); }
379 379
380 380
381#define getuservalue(L,u,o) \ 381#define getuservalue(L,u,o) \
382 { TValue *io=(o); const Udata *iu = (u); \ 382 { TValue *io=(o); const Udata *iu = (u); \
383 io->value_ = iu->user_; io->tt_ = iu->ttuv_; \ 383 io->value_ = iu->user_; settt_(io, iu->ttuv_); \
384 checkliveness(G(L),io); } 384 checkliveness(G(L),io); }
385 385
386 386