From cb7f027380b9eebcf7ce2c00c6e1c5450d53b47a Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 13 Apr 1999 16:30:51 -0300 Subject: IMtable must be initialized (and IMtable_size is not needed any more) due to new way to handle growing vectors (previous modification). --- lstate.c | 13 +++++++------ lstate.h | 3 +-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lstate.c b/lstate.c index f953f08f..be5acf0c 100644 --- a/lstate.c +++ b/lstate.c @@ -1,5 +1,5 @@ /* -** $Id: lstate.c,v 1.8 1999/02/04 17:47:59 roberto Exp roberto $ +** $Id: lstate.c,v 1.9 1999/02/25 15:17:01 roberto Exp roberto $ ** Global State ** See Copyright Notice in lua.h */ @@ -24,11 +24,15 @@ void lua_open (void) { if (lua_state) return; lua_state = luaM_new(lua_State); - L->numCblocks = 0; L->Cstack.base = 0; L->Cstack.lua2C = 0; L->Cstack.num = 0; L->errorJmp = NULL; + L->Mbuffer = NULL; + L->Mbuffbase = 0; + L->Mbuffsize = 0; + L->Mbuffnext = 0; + L->numCblocks = 0; L->debug = 0; L->callhook = NULL; L->linehook = NULL; @@ -40,12 +44,9 @@ void lua_open (void) L->rootglobal.marked = 0; L->roottable.next = NULL; L->roottable.marked = 0; + L->IMtable = NULL; L->refArray = NULL; L->refSize = 0; - L->Mbuffsize = 0; - L->Mbuffnext = 0; - L->Mbuffbase = 0; - L->Mbuffer = NULL; L->GCthreshold = GARBAGE_BLOCK; L->nblocks = 0; luaD_init(); diff --git a/lstate.h b/lstate.h index 43598917..6de48233 100644 --- a/lstate.h +++ b/lstate.h @@ -1,5 +1,5 @@ /* -** $Id: lstate.h,v 1.14 1999/02/04 17:47:59 roberto Exp roberto $ +** $Id: lstate.h,v 1.15 1999/02/25 15:17:01 roberto Exp roberto $ ** Global State ** See Copyright Notice in lua.h */ @@ -71,7 +71,6 @@ struct lua_State { GCnode rootglobal; /* list of strings with global values */ stringtable *string_root; /* array of hash tables for strings and udata */ struct IM *IMtable; /* table for tag methods */ - int IMtable_size; /* size of IMtable */ int last_tag; /* last used tag in IMtable */ struct ref *refArray; /* locked objects */ int refSize; /* size of refArray */ -- cgit v1.2.3-55-g6feb