`const' array in protos breaked in 3 arrays (for strings, numbers, and
prototypes).
This commit is contained in:
14
lfunc.c
14
lfunc.c
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lfunc.c,v 1.15 1999/11/22 13:12:07 roberto Exp roberto $
|
||||
** $Id: lfunc.c,v 1.16 1999/12/27 17:33:22 roberto Exp roberto $
|
||||
** Auxiliary functions to manipulate prototypes and closures
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@@ -34,8 +34,12 @@ TProtoFunc *luaF_newproto (lua_State *L) {
|
||||
f->code = NULL;
|
||||
f->lineDefined = 0;
|
||||
f->source = NULL;
|
||||
f->consts = NULL;
|
||||
f->nconsts = 0;
|
||||
f->strcnst = NULL;
|
||||
f->nstrcnst = 0;
|
||||
f->numcnst = NULL;
|
||||
f->nnumcnst = 0;
|
||||
f->protocnst = NULL;
|
||||
f->nprotocnst = 0;
|
||||
f->locvars = NULL;
|
||||
f->next = L->rootproto;
|
||||
L->rootproto = f;
|
||||
@@ -49,7 +53,9 @@ void luaF_freeproto (lua_State *L, TProtoFunc *f) {
|
||||
L->nblocks -= gcsizeproto(L, f);
|
||||
luaM_free(L, f->code);
|
||||
luaM_free(L, f->locvars);
|
||||
luaM_free(L, f->consts);
|
||||
luaM_free(L, f->strcnst);
|
||||
luaM_free(L, f->numcnst);
|
||||
luaM_free(L, f->protocnst);
|
||||
luaM_free(L, f);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user