diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-02-11 08:46:24 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-02-11 08:46:24 -0200 |
| commit | 7a40cdbda0a171da223094208dd3c6e3eca13922 (patch) | |
| tree | c95840411ac26e11b0683d4a5fc88402c1d0a70a /lfunc.c | |
| parent | 3cdeacbbfba9308dd2dcc995a9bcc510bfcead31 (diff) | |
| download | lua-7a40cdbda0a171da223094208dd3c6e3eca13922.tar.gz lua-7a40cdbda0a171da223094208dd3c6e3eca13922.tar.bz2 lua-7a40cdbda0a171da223094208dd3c6e3eca13922.zip | |
different variables for number of upvalues and size of upvalue array
(makes code clearer)
Diffstat (limited to 'lfunc.c')
| -rw-r--r-- | lfunc.c | 7 |
1 files changed, 4 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lfunc.c,v 1.64 2002/12/04 17:38:31 roberto Exp roberto $ | 2 | ** $Id: lfunc.c,v 1.65 2002/12/19 11:11:55 roberto Exp roberto $ |
| 3 | ** Auxiliary functions to manipulate prototypes and closures | 3 | ** Auxiliary functions to manipulate prototypes and closures |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -84,7 +84,8 @@ Proto *luaF_newproto (lua_State *L) { | |||
| 84 | f->code = NULL; | 84 | f->code = NULL; |
| 85 | f->sizecode = 0; | 85 | f->sizecode = 0; |
| 86 | f->sizelineinfo = 0; | 86 | f->sizelineinfo = 0; |
| 87 | f->nupvalues = 0; | 87 | f->sizeupvalues = 0; |
| 88 | f->nups = 0; | ||
| 88 | f->upvalues = NULL; | 89 | f->upvalues = NULL; |
| 89 | f->numparams = 0; | 90 | f->numparams = 0; |
| 90 | f->is_vararg = 0; | 91 | f->is_vararg = 0; |
| @@ -104,7 +105,7 @@ void luaF_freeproto (lua_State *L, Proto *f) { | |||
| 104 | luaM_freearray(L, f->k, f->sizek, TObject); | 105 | luaM_freearray(L, f->k, f->sizek, TObject); |
| 105 | luaM_freearray(L, f->lineinfo, f->sizelineinfo, int); | 106 | luaM_freearray(L, f->lineinfo, f->sizelineinfo, int); |
| 106 | luaM_freearray(L, f->locvars, f->sizelocvars, struct LocVar); | 107 | luaM_freearray(L, f->locvars, f->sizelocvars, struct LocVar); |
| 107 | luaM_freearray(L, f->upvalues, f->nupvalues, TString *); | 108 | luaM_freearray(L, f->upvalues, f->sizeupvalues, TString *); |
| 108 | luaM_freelem(L, f); | 109 | luaM_freelem(L, f); |
| 109 | } | 110 | } |
| 110 | 111 | ||
