aboutsummaryrefslogtreecommitdiff
path: root/lobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'lobject.h')
-rw-r--r--lobject.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/lobject.h b/lobject.h
index ebcdbbb7..53df58cc 100644
--- a/lobject.h
+++ b/lobject.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lobject.h,v 1.103 2001/06/05 18:17:01 roberto Exp roberto $ 2** $Id: lobject.h,v 1.104 2001/06/06 18:00:19 roberto Exp roberto $
3** Type definitions for Lua objects 3** Type definitions for Lua objects
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -82,9 +82,9 @@ typedef TObject *StkId; /* index to stack elements */
82*/ 82*/
83typedef struct TString { 83typedef struct TString {
84 lu_hash hash; 84 lu_hash hash;
85 int constindex; /* hint to reuse constants */
86 size_t len; 85 size_t len;
87 int marked; 86 unsigned short constindex; /* hint to reuse constants */
87 short marked;
88 struct TString *nexthash; /* chain for hash table */ 88 struct TString *nexthash; /* chain for hash table */
89} TString; 89} TString;
90 90
@@ -105,14 +105,17 @@ union L_UTString {
105 105
106 106
107typedef struct Udata { 107typedef struct Udata {
108 int tag; 108 int tag; /* negative means `marked' (only during GC) */
109 void *value; 109 void *value;
110 size_t len; 110 size_t len;
111 int marked;
112 struct Udata *next; /* chain for list of all udata */ 111 struct Udata *next; /* chain for list of all udata */
113} Udata; 112} Udata;
114 113
115 114
115#define switchudatamark(u) ((u)->tag = (-((u)->tag+1)))
116#define ismarkedudata(u) ((u)->tag < 0)
117
118
116 119
117/* 120/*
118** Function Prototypes 121** Function Prototypes