different variables for number of upvalues and size of upvalue array

(makes code clearer)
This commit is contained in:
Roberto Ierusalimschy
2003-02-11 08:46:24 -02:00
parent 3cdeacbbfb
commit 7a40cdbda0
10 changed files with 43 additions and 55 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lfunc.c,v 1.64 2002/12/04 17:38:31 roberto Exp roberto $
** $Id: lfunc.c,v 1.65 2002/12/19 11:11:55 roberto Exp roberto $
** Auxiliary functions to manipulate prototypes and closures
** See Copyright Notice in lua.h
*/
@@ -84,7 +84,8 @@ Proto *luaF_newproto (lua_State *L) {
f->code = NULL;
f->sizecode = 0;
f->sizelineinfo = 0;
f->nupvalues = 0;
f->sizeupvalues = 0;
f->nups = 0;
f->upvalues = NULL;
f->numparams = 0;
f->is_vararg = 0;
@@ -104,7 +105,7 @@ void luaF_freeproto (lua_State *L, Proto *f) {
luaM_freearray(L, f->k, f->sizek, TObject);
luaM_freearray(L, f->lineinfo, f->sizelineinfo, int);
luaM_freearray(L, f->locvars, f->sizelocvars, struct LocVar);
luaM_freearray(L, f->upvalues, f->nupvalues, TString *);
luaM_freearray(L, f->upvalues, f->sizeupvalues, TString *);
luaM_freelem(L, f);
}