diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-06-05 15:17:01 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-06-05 15:17:01 -0300 |
commit | 762d059a13d83eb367238a6115bbb4f5f13fcb49 (patch) | |
tree | f35fdf0675b791865d0d4800522b172903b34803 /lfunc.c | |
parent | 572a69b6afbd368beab8844bc876b0f9690b5253 (diff) | |
download | lua-762d059a13d83eb367238a6115bbb4f5f13fcb49.tar.gz lua-762d059a13d83eb367238a6115bbb4f5f13fcb49.tar.bz2 lua-762d059a13d83eb367238a6115bbb4f5f13fcb49.zip |
new implementation for the Virtual Machine
Diffstat (limited to 'lfunc.c')
-rw-r--r-- | lfunc.c | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lfunc.c,v 1.42 2001/02/23 17:17:25 roberto Exp roberto $ | 2 | ** $Id: lfunc.c,v 1.43 2001/03/26 14:31:49 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 | */ |
@@ -30,10 +30,8 @@ Closure *luaF_newclosure (lua_State *L, int nelems) { | |||
30 | 30 | ||
31 | Proto *luaF_newproto (lua_State *L) { | 31 | Proto *luaF_newproto (lua_State *L) { |
32 | Proto *f = luaM_new(L, Proto); | 32 | Proto *f = luaM_new(L, Proto); |
33 | f->knum = NULL; | 33 | f->k = NULL; |
34 | f->sizeknum = 0; | 34 | f->sizek = 0; |
35 | f->kstr = NULL; | ||
36 | f->sizekstr = 0; | ||
37 | f->kproto = NULL; | 35 | f->kproto = NULL; |
38 | f->sizekproto = 0; | 36 | f->sizekproto = 0; |
39 | f->code = NULL; | 37 | f->code = NULL; |
@@ -58,8 +56,7 @@ Proto *luaF_newproto (lua_State *L) { | |||
58 | void luaF_freeproto (lua_State *L, Proto *f) { | 56 | void luaF_freeproto (lua_State *L, Proto *f) { |
59 | luaM_freearray(L, f->code, f->sizecode, Instruction); | 57 | luaM_freearray(L, f->code, f->sizecode, Instruction); |
60 | luaM_freearray(L, f->locvars, f->sizelocvars, struct LocVar); | 58 | luaM_freearray(L, f->locvars, f->sizelocvars, struct LocVar); |
61 | luaM_freearray(L, f->kstr, f->sizekstr, TString *); | 59 | luaM_freearray(L, f->k, f->sizek, TObject); |
62 | luaM_freearray(L, f->knum, f->sizeknum, lua_Number); | ||
63 | luaM_freearray(L, f->kproto, f->sizekproto, Proto *); | 60 | luaM_freearray(L, f->kproto, f->sizekproto, Proto *); |
64 | luaM_freearray(L, f->lineinfo, f->sizelineinfo, int); | 61 | luaM_freearray(L, f->lineinfo, f->sizelineinfo, int); |
65 | luaM_freelem(L, f, Proto); | 62 | luaM_freelem(L, f, Proto); |