diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-03-10 15:37:44 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-03-10 15:37:44 -0300 |
| commit | 73aa465a8ed8dee6c6a27a6f8b2f51227b70789d (patch) | |
| tree | 496a63ffffe0312f1d0b9882d97944fa38ed7801 /lfunc.c | |
| parent | 3d0577f4b98908be3f2d697ab75c5fbbd3f6999b (diff) | |
| download | lua-73aa465a8ed8dee6c6a27a6f8b2f51227b70789d.tar.gz lua-73aa465a8ed8dee6c6a27a6f8b2f51227b70789d.tar.bz2 lua-73aa465a8ed8dee6c6a27a6f8b2f51227b70789d.zip | |
some name changes
Diffstat (limited to 'lfunc.c')
| -rw-r--r-- | lfunc.c | 12 |
1 files changed, 6 insertions, 6 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lfunc.c,v 1.18 2000/01/28 16:53:00 roberto Exp roberto $ | 2 | ** $Id: lfunc.c,v 1.19 2000/03/03 14:58:26 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 | */ |
| @@ -13,7 +13,7 @@ | |||
| 13 | #include "lmem.h" | 13 | #include "lmem.h" |
| 14 | #include "lstate.h" | 14 | #include "lstate.h" |
| 15 | 15 | ||
| 16 | #define gcsizeproto(L, p) numblocks(L, 0, sizeof(TProtoFunc)) | 16 | #define gcsizeproto(L, p) numblocks(L, 0, sizeof(Proto)) |
| 17 | #define gcsizeclosure(L, c) numblocks(L, c->nelems, sizeof(Closure)) | 17 | #define gcsizeclosure(L, c) numblocks(L, c->nelems, sizeof(Closure)) |
| 18 | 18 | ||
| 19 | 19 | ||
| @@ -29,8 +29,8 @@ Closure *luaF_newclosure (lua_State *L, int nelems) { | |||
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | 31 | ||
| 32 | TProtoFunc *luaF_newproto (lua_State *L) { | 32 | Proto *luaF_newproto (lua_State *L) { |
| 33 | TProtoFunc *f = luaM_new(L, TProtoFunc); | 33 | Proto *f = luaM_new(L, Proto); |
| 34 | f->code = NULL; | 34 | f->code = NULL; |
| 35 | f->lineDefined = 0; | 35 | f->lineDefined = 0; |
| 36 | f->source = NULL; | 36 | f->source = NULL; |
| @@ -49,7 +49,7 @@ TProtoFunc *luaF_newproto (lua_State *L) { | |||
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | 51 | ||
| 52 | void luaF_freeproto (lua_State *L, TProtoFunc *f) { | 52 | void luaF_freeproto (lua_State *L, Proto *f) { |
| 53 | L->nblocks -= gcsizeproto(L, f); | 53 | L->nblocks -= gcsizeproto(L, f); |
| 54 | luaM_free(L, f->code); | 54 | luaM_free(L, f->code); |
| 55 | luaM_free(L, f->locvars); | 55 | luaM_free(L, f->locvars); |
| @@ -70,7 +70,7 @@ void luaF_freeclosure (lua_State *L, Closure *c) { | |||
| 70 | ** Look for n-th local variable at line `line' in function `func'. | 70 | ** Look for n-th local variable at line `line' in function `func'. |
| 71 | ** Returns NULL if not found. | 71 | ** Returns NULL if not found. |
| 72 | */ | 72 | */ |
| 73 | const char *luaF_getlocalname (const TProtoFunc *func, | 73 | const char *luaF_getlocalname (const Proto *func, |
| 74 | int local_number, int line) { | 74 | int local_number, int line) { |
| 75 | int count = 0; | 75 | int count = 0; |
| 76 | const char *varname = NULL; | 76 | const char *varname = NULL; |
