From a3d36fe283c09d4e56474da98f22d13162cc9fec Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 11 Apr 2017 15:41:09 -0300 Subject: Upvalues collected like everything else (with mark-sweep) instead of reference count (simpler and better for generational mode) --- lstate.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lstate.h') diff --git a/lstate.h b/lstate.h index b01859aa..dc74370b 100644 --- a/lstate.h +++ b/lstate.h @@ -1,5 +1,5 @@ /* -** $Id: lstate.h,v 2.135 2017/02/23 21:07:34 roberto Exp $ +** $Id: lstate.h,v 2.136 2017/04/05 16:50:51 roberto Exp roberto $ ** Global State ** See Copyright Notice in lua.h */ @@ -224,6 +224,7 @@ union GCUnion { struct Table h; struct Proto p; struct lua_State th; /* thread */ + struct UpVal upv; }; @@ -240,6 +241,7 @@ union GCUnion { #define gco2t(o) check_exp((o)->tt == LUA_TTABLE, &((cast_u(o))->h)) #define gco2p(o) check_exp((o)->tt == LUA_TPROTO, &((cast_u(o))->p)) #define gco2th(o) check_exp((o)->tt == LUA_TTHREAD, &((cast_u(o))->th)) +#define gco2upv(o) check_exp((o)->tt == LUA_TUPVAL, &((cast_u(o))->upv)) /* macro to convert a Lua object into a GCObject */ -- cgit v1.2.3-55-g6feb