From bb129031205acc64eb6b41c98d8a08c1fccce308 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 18 Jul 2014 11:46:47 -0300 Subject: type 'Udata' refers directly to structure inside the union (union used only for aligning purposes now) --- lstate.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lstate.h') diff --git a/lstate.h b/lstate.h index 662e925a..6e411317 100644 --- a/lstate.h +++ b/lstate.h @@ -1,5 +1,5 @@ /* -** $Id: lstate.h,v 2.111 2014/07/18 12:17:54 roberto Exp roberto $ +** $Id: lstate.h,v 2.112 2014/07/18 13:36:14 roberto Exp roberto $ ** Global State ** See Copyright Notice in lua.h */ @@ -175,7 +175,7 @@ struct lua_State { union GCUnion { GCObject gc; /* common header */ struct TString ts; - union Udata u; + struct Udata u; union Closure cl; struct Table h; struct Proto p; @@ -188,8 +188,7 @@ union GCUnion { /* macros to convert a GCObject into a specific value */ #define gco2ts(o) \ check_exp(novariant((o)->tt) == LUA_TSTRING, &((cast_u(o))->ts)) -#define rawgco2u(o) check_exp((o)->tt == LUA_TUSERDATA, &((cast_u(o))->u)) -#define gco2u(o) (&rawgco2u(o)->uv) +#define gco2u(o) check_exp((o)->tt == LUA_TUSERDATA, &((cast_u(o))->u)) #define gco2lcl(o) check_exp((o)->tt == LUA_TLCL, &((cast_u(o))->cl.l)) #define gco2ccl(o) check_exp((o)->tt == LUA_TCCL, &((cast_u(o))->cl.c)) #define gco2cl(o) \ -- cgit v1.2.3-55-g6feb