diff options
Diffstat (limited to 'lfunc.c')
-rw-r--r-- | lfunc.c | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lfunc.c,v 1.15 1999/11/22 13:12:07 roberto Exp roberto $ | 2 | ** $Id: lfunc.c,v 1.16 1999/12/27 17:33:22 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 | */ |
@@ -34,8 +34,12 @@ TProtoFunc *luaF_newproto (lua_State *L) { | |||
34 | f->code = NULL; | 34 | f->code = NULL; |
35 | f->lineDefined = 0; | 35 | f->lineDefined = 0; |
36 | f->source = NULL; | 36 | f->source = NULL; |
37 | f->consts = NULL; | 37 | f->strcnst = NULL; |
38 | f->nconsts = 0; | 38 | f->nstrcnst = 0; |
39 | f->numcnst = NULL; | ||
40 | f->nnumcnst = 0; | ||
41 | f->protocnst = NULL; | ||
42 | f->nprotocnst = 0; | ||
39 | f->locvars = NULL; | 43 | f->locvars = NULL; |
40 | f->next = L->rootproto; | 44 | f->next = L->rootproto; |
41 | L->rootproto = f; | 45 | L->rootproto = f; |
@@ -49,7 +53,9 @@ void luaF_freeproto (lua_State *L, TProtoFunc *f) { | |||
49 | L->nblocks -= gcsizeproto(L, f); | 53 | L->nblocks -= gcsizeproto(L, f); |
50 | luaM_free(L, f->code); | 54 | luaM_free(L, f->code); |
51 | luaM_free(L, f->locvars); | 55 | luaM_free(L, f->locvars); |
52 | luaM_free(L, f->consts); | 56 | luaM_free(L, f->strcnst); |
57 | luaM_free(L, f->numcnst); | ||
58 | luaM_free(L, f->protocnst); | ||
53 | luaM_free(L, f); | 59 | luaM_free(L, f); |
54 | } | 60 | } |
55 | 61 | ||