IMtable must be initialized (and IMtable_size is not needed any more) due
to new way to handle growing vectors (previous modification).
This commit is contained in:
13
lstate.c
13
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
|
** Global State
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@@ -24,11 +24,15 @@ void lua_open (void)
|
|||||||
{
|
{
|
||||||
if (lua_state) return;
|
if (lua_state) return;
|
||||||
lua_state = luaM_new(lua_State);
|
lua_state = luaM_new(lua_State);
|
||||||
L->numCblocks = 0;
|
|
||||||
L->Cstack.base = 0;
|
L->Cstack.base = 0;
|
||||||
L->Cstack.lua2C = 0;
|
L->Cstack.lua2C = 0;
|
||||||
L->Cstack.num = 0;
|
L->Cstack.num = 0;
|
||||||
L->errorJmp = NULL;
|
L->errorJmp = NULL;
|
||||||
|
L->Mbuffer = NULL;
|
||||||
|
L->Mbuffbase = 0;
|
||||||
|
L->Mbuffsize = 0;
|
||||||
|
L->Mbuffnext = 0;
|
||||||
|
L->numCblocks = 0;
|
||||||
L->debug = 0;
|
L->debug = 0;
|
||||||
L->callhook = NULL;
|
L->callhook = NULL;
|
||||||
L->linehook = NULL;
|
L->linehook = NULL;
|
||||||
@@ -40,12 +44,9 @@ void lua_open (void)
|
|||||||
L->rootglobal.marked = 0;
|
L->rootglobal.marked = 0;
|
||||||
L->roottable.next = NULL;
|
L->roottable.next = NULL;
|
||||||
L->roottable.marked = 0;
|
L->roottable.marked = 0;
|
||||||
|
L->IMtable = NULL;
|
||||||
L->refArray = NULL;
|
L->refArray = NULL;
|
||||||
L->refSize = 0;
|
L->refSize = 0;
|
||||||
L->Mbuffsize = 0;
|
|
||||||
L->Mbuffnext = 0;
|
|
||||||
L->Mbuffbase = 0;
|
|
||||||
L->Mbuffer = NULL;
|
|
||||||
L->GCthreshold = GARBAGE_BLOCK;
|
L->GCthreshold = GARBAGE_BLOCK;
|
||||||
L->nblocks = 0;
|
L->nblocks = 0;
|
||||||
luaD_init();
|
luaD_init();
|
||||||
|
|||||||
3
lstate.h
3
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
|
** Global State
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@@ -71,7 +71,6 @@ struct lua_State {
|
|||||||
GCnode rootglobal; /* list of strings with global values */
|
GCnode rootglobal; /* list of strings with global values */
|
||||||
stringtable *string_root; /* array of hash tables for strings and udata */
|
stringtable *string_root; /* array of hash tables for strings and udata */
|
||||||
struct IM *IMtable; /* table for tag methods */
|
struct IM *IMtable; /* table for tag methods */
|
||||||
int IMtable_size; /* size of IMtable */
|
|
||||||
int last_tag; /* last used tag in IMtable */
|
int last_tag; /* last used tag in IMtable */
|
||||||
struct ref *refArray; /* locked objects */
|
struct ref *refArray; /* locked objects */
|
||||||
int refSize; /* size of refArray */
|
int refSize; /* size of refArray */
|
||||||
|
|||||||
Reference in New Issue
Block a user