From 7a40cdbda0a171da223094208dd3c6e3eca13922 Mon Sep 17 00:00:00 2001
From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Tue, 11 Feb 2003 08:46:24 -0200
Subject: different variables for number of upvalues and size of upvalue array
 (makes code clearer)

---
 lfunc.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

(limited to 'lfunc.c')

diff --git a/lfunc.c b/lfunc.c
index e55b59d9..2ce2f047 100644
--- a/lfunc.c
+++ b/lfunc.c
@@ -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);
 }
 
-- 
cgit v1.2.3-55-g6feb