aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1997-11-27 13:59:25 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1997-11-27 13:59:25 -0200
commitef37c87e9333d825838d421e4652076b70c83a72 (patch)
tree2e42a23ae28870e731157feeee14d7808a8b34a6
parent9e029f98b9b4859aa30305a0c36e560a085c02a9 (diff)
downloadlua-ef37c87e9333d825838d421e4652076b70c83a72.tar.gz
lua-ef37c87e9333d825838d421e4652076b70c83a72.tar.bz2
lua-ef37c87e9333d825838d421e4652076b70c83a72.zip
no more 'globalbag'
-rw-r--r--lapi.c8
-rw-r--r--lgc.c3
-rw-r--r--lstate.c4
-rw-r--r--lstate.h3
-rw-r--r--lua.h4
5 files changed, 5 insertions, 17 deletions
diff --git a/lapi.c b/lapi.c
index aa6bd324..068b536e 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 1.7 1997/11/21 19:00:46 roberto Exp roberto $ 2** $Id: lapi.c,v 1.8 1997/11/26 18:53:45 roberto Exp roberto $
3** Lua API 3** Lua API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -191,12 +191,6 @@ lua_Object lua_createtable (void)
191} 191}
192 192
193 193
194lua_Object lua_globalbag (void)
195{
196 return put_luaObject(&L->globalbag);
197}
198
199
200lua_Object lua_getglobal (char *name) 194lua_Object lua_getglobal (char *name)
201{ 195{
202 luaD_checkstack(2); /* may need that to call T.M. */ 196 luaD_checkstack(2); /* may need that to call T.M. */
diff --git a/lgc.c b/lgc.c
index c3225deb..fd7a6bcb 100644
--- a/lgc.c
+++ b/lgc.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lgc.c,v 1.7 1997/11/03 20:45:23 roberto Exp roberto $ 2** $Id: lgc.c,v 1.8 1997/11/19 17:29:23 roberto Exp roberto $
3** Garbage Collector 3** Garbage Collector
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -241,7 +241,6 @@ static void markall (void)
241 luaD_travstack(markobject); /* mark stack objects */ 241 luaD_travstack(markobject); /* mark stack objects */
242 globalmark(); /* mark global variable values and names */ 242 globalmark(); /* mark global variable values and names */
243 travlock(); /* mark locked objects */ 243 travlock(); /* mark locked objects */
244 markobject(&L->globalbag); /* mark elements in global bag */
245 luaT_travtagmethods(markobject); /* mark fallbacks */ 244 luaT_travtagmethods(markobject); /* mark fallbacks */
246} 245}
247 246
diff --git a/lstate.c b/lstate.c
index 653c4ba3..69100ba3 100644
--- a/lstate.c
+++ b/lstate.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: $ 2** $Id: lstate.c,v 1.1 1997/11/19 17:31:19 roberto Exp roberto $
3** Global State 3** Global State
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -45,8 +45,6 @@ void lua_open (void)
45 luaS_init(); 45 luaS_init();
46 luaX_init(); 46 luaX_init();
47 luaT_init(); 47 luaT_init();
48 L->globalbag.ttype = LUA_T_ARRAY;
49 L->globalbag.value.a = luaH_new(0);
50 luaB_predefine(); 48 luaB_predefine();
51} 49}
52 50
diff --git a/lstate.h b/lstate.h
index 83117949..c1005817 100644
--- a/lstate.h
+++ b/lstate.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstate.h,v 1.2 1997/11/21 19:00:46 roberto Exp roberto $ 2** $Id: lstate.h,v 1.3 1997/11/26 20:28:22 roberto Exp roberto $
3** Global State 3** Global State
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -66,7 +66,6 @@ typedef struct LState {
66 int refSize; /* size of refArray */ 66 int refSize; /* size of refArray */
67 unsigned long GCthreshold; 67 unsigned long GCthreshold;
68 unsigned long nblocks; /* number of 'blocks' currently allocated */ 68 unsigned long nblocks; /* number of 'blocks' currently allocated */
69 TObject globalbag; /* table for generic use by C */
70 char *Mbuffer; /* global buffer, used by luaM_buffer */ 69 char *Mbuffer; /* global buffer, used by luaM_buffer */
71 unsigned long Mbuffsize; /* size of Mbuffer */ 70 unsigned long Mbuffsize; /* size of Mbuffer */
72} LState; 71} LState;
diff --git a/lua.h b/lua.h
index 23a30cbe..4549f927 100644
--- a/lua.h
+++ b/lua.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.h,v 1.4 1997/11/19 17:29:23 roberto Exp roberto $ 2** $Id: lua.h,v 1.5 1997/11/26 18:53:45 roberto Exp roberto $
3** LUA - An Extensible Extension Language 3** LUA - An Extensible Extension Language
4** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil 4** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil
5** e-mail: lua@tecgraf.puc-rio.br 5** e-mail: lua@tecgraf.puc-rio.br
@@ -117,8 +117,6 @@ int lua_ref (int lock); /* In: value */
117lua_Object lua_getref (int ref); 117lua_Object lua_getref (int ref);
118void lua_unref (int ref); 118void lua_unref (int ref);
119 119
120lua_Object lua_globalbag (void);
121
122lua_Object lua_createtable (void); 120lua_Object lua_createtable (void);
123 121
124long lua_collectgarbage (long limit); 122long lua_collectgarbage (long limit);