From 11a70220670f25a9929439f0b27331f09f05235c Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 8 May 2000 16:32:53 -0300 Subject: global variables are stored in a Lua table --- lobject.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'lobject.h') diff --git a/lobject.h b/lobject.h index 921a7a05..c4e605c6 100644 --- a/lobject.h +++ b/lobject.h @@ -1,5 +1,5 @@ /* -** $Id: lobject.h,v 1.60 2000/04/10 19:20:24 roberto Exp roberto $ +** $Id: lobject.h,v 1.61 2000/04/25 16:55:09 roberto Exp roberto $ ** Type definitions for Lua objects ** See Copyright Notice in lua.h */ @@ -85,20 +85,13 @@ typedef struct TObject { } TObject; -typedef struct GlobalVar { - TObject value; - struct GlobalVar *next; - struct TString *name; -} GlobalVar; - - /* ** String headers for string table */ typedef struct TString { union { struct { /* for strings */ - GlobalVar *gv; /* eventual global value with this name */ + unsigned long hash; long len; } s; struct { /* for userdata */ @@ -107,7 +100,6 @@ typedef struct TString { } d; } u; struct TString *nexthash; /* chain for hash table */ - unsigned long hash; int constindex; /* hint to reuse constants (= -1 if this is a userdata) */ unsigned char marked; char str[1]; /* variable length string!! must be the last field! */ -- cgit v1.2.3-55-g6feb