From 4343420d4d559a7d4cdacdbc1fd61552dcf59f04 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 4 Oct 1999 15:51:04 -0200 Subject: simplified version of `gc' tag method (only for userdata now). --- lobject.h | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) (limited to 'lobject.h') diff --git a/lobject.h b/lobject.h index 2e69ebf5..99239909 100644 --- a/lobject.h +++ b/lobject.h @@ -1,5 +1,5 @@ /* -** $Id: lobject.h,v 1.29 1999/08/16 20:52:00 roberto Exp roberto $ +** $Id: lobject.h,v 1.30 1999/09/06 20:34:18 roberto Exp roberto $ ** Type definitions for Lua objects ** See Copyright Notice in lua.h */ @@ -85,21 +85,13 @@ typedef struct TObject { -/* -** generic header for garbage collector lists -*/ -typedef struct GCnode { - struct GCnode *next; - int marked; -} GCnode; - - /* ** String headers for string table */ typedef struct TaggedString { - GCnode head; + struct TaggedString *next; + int marked; unsigned long hash; int constindex; /* hint to reuse constants (= -1 if this is a userdata) */ union { @@ -122,7 +114,8 @@ typedef struct TaggedString { ** Function Prototypes */ typedef struct TProtoFunc { - GCnode head; + struct TProtoFunc *next; + int marked; struct TObject *consts; int nconsts; Byte *code; /* ends with opcode ENDCODE */ @@ -157,7 +150,8 @@ typedef struct LocVar { ** Closures */ typedef struct Closure { - GCnode head; + struct Closure *next; + int marked; int nelems; /* not included the first one (always the prototype) */ TObject consts[1]; /* at least one for prototype */ } Closure; @@ -170,7 +164,8 @@ typedef struct node { } Node; typedef struct Hash { - GCnode head; + struct Hash *next; + int marked; Node *node; int nhash; int nuse; @@ -189,7 +184,6 @@ extern const TObject luaO_nilobject; : luaO_equalval(t1,t2)) int luaO_equalval (const TObject *t1, const TObject *t2); int luaO_redimension (int oldsize); -void luaO_insertlist (GCnode *root, GCnode *node); int luaO_str2d (const char *s, real *result); #ifdef OLD_ANSI -- cgit v1.2.3-55-g6feb