lua

A copy of the Lua development repository
Log | Files | Refs | README

commit ef37c87e9333d825838d421e4652076b70c83a72
parent 9e029f98b9b4859aa30305a0c36e560a085c02a9
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Thu, 27 Nov 1997 13:59:04 -0200

no more 'globalbag'

Diffstat:
Mlapi.c | 8+-------
Mlgc.c | 3+--
Mlstate.c | 4+---
Mlstate.h | 3+--
Mlua.h | 4+---
5 files changed, 5 insertions(+), 17 deletions(-)

diff --git a/lapi.c b/lapi.c @@ -1,5 +1,5 @@ /* -** $Id: lapi.c,v 1.7 1997/11/21 19:00:46 roberto Exp roberto $ +** $Id: lapi.c,v 1.8 1997/11/26 18:53:45 roberto Exp roberto $ ** Lua API ** See Copyright Notice in lua.h */ @@ -191,12 +191,6 @@ lua_Object lua_createtable (void) } -lua_Object lua_globalbag (void) -{ - return put_luaObject(&L->globalbag); -} - - lua_Object lua_getglobal (char *name) { luaD_checkstack(2); /* may need that to call T.M. */ diff --git a/lgc.c b/lgc.c @@ -1,5 +1,5 @@ /* -** $Id: lgc.c,v 1.7 1997/11/03 20:45:23 roberto Exp roberto $ +** $Id: lgc.c,v 1.8 1997/11/19 17:29:23 roberto Exp roberto $ ** Garbage Collector ** See Copyright Notice in lua.h */ @@ -241,7 +241,6 @@ static void markall (void) luaD_travstack(markobject); /* mark stack objects */ globalmark(); /* mark global variable values and names */ travlock(); /* mark locked objects */ - markobject(&L->globalbag); /* mark elements in global bag */ luaT_travtagmethods(markobject); /* mark fallbacks */ } diff --git a/lstate.c b/lstate.c @@ -1,5 +1,5 @@ /* -** $Id: $ +** $Id: lstate.c,v 1.1 1997/11/19 17:31:19 roberto Exp roberto $ ** Global State ** See Copyright Notice in lua.h */ @@ -45,8 +45,6 @@ void lua_open (void) luaS_init(); luaX_init(); luaT_init(); - L->globalbag.ttype = LUA_T_ARRAY; - L->globalbag.value.a = luaH_new(0); luaB_predefine(); } diff --git a/lstate.h b/lstate.h @@ -1,5 +1,5 @@ /* -** $Id: lstate.h,v 1.2 1997/11/21 19:00:46 roberto Exp roberto $ +** $Id: lstate.h,v 1.3 1997/11/26 20:28:22 roberto Exp roberto $ ** Global State ** See Copyright Notice in lua.h */ @@ -66,7 +66,6 @@ typedef struct LState { int refSize; /* size of refArray */ unsigned long GCthreshold; unsigned long nblocks; /* number of 'blocks' currently allocated */ - TObject globalbag; /* table for generic use by C */ char *Mbuffer; /* global buffer, used by luaM_buffer */ unsigned long Mbuffsize; /* size of Mbuffer */ } LState; diff --git a/lua.h b/lua.h @@ -1,5 +1,5 @@ /* -** $Id: lua.h,v 1.4 1997/11/19 17:29:23 roberto Exp roberto $ +** $Id: lua.h,v 1.5 1997/11/26 18:53:45 roberto Exp roberto $ ** LUA - An Extensible Extension Language ** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil ** e-mail: lua@tecgraf.puc-rio.br @@ -117,8 +117,6 @@ int lua_ref (int lock); /* In: value */ lua_Object lua_getref (int ref); void lua_unref (int ref); -lua_Object lua_globalbag (void); - lua_Object lua_createtable (void); long lua_collectgarbage (long limit);