From 7d45a5f48ff32a4e09a1734de23823943d6a6b28 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 18 Feb 2005 10:40:02 -0200 Subject: C functions and userdata also have environments --- lobject.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lobject.h') diff --git a/lobject.h b/lobject.h index 0c781ef3..ab0ddee7 100644 --- a/lobject.h +++ b/lobject.h @@ -1,5 +1,5 @@ /* -** $Id: lobject.h,v 2.9 2005/01/05 18:20:51 roberto Exp $ +** $Id: lobject.h,v 2.10 2005/01/18 17:18:09 roberto Exp roberto $ ** Type definitions for Lua objects ** See Copyright Notice in lua.h */ @@ -218,6 +218,7 @@ typedef union Udata { struct { CommonHeader; struct Table *metatable; + struct Table *env; size_t len; } uv; } Udata; @@ -286,7 +287,8 @@ typedef struct UpVal { */ #define ClosureHeader \ - CommonHeader; lu_byte isC; lu_byte nupvalues; GCObject *gclist + CommonHeader; lu_byte isC; lu_byte nupvalues; GCObject *gclist; \ + struct Table *env typedef struct CClosure { ClosureHeader; @@ -298,7 +300,6 @@ typedef struct CClosure { typedef struct LClosure { ClosureHeader; struct Proto *p; - TValue g; /* global table for this closure */ UpVal *upvals[1]; } LClosure; -- cgit v1.2.3-55-g6feb