diff options
Diffstat (limited to 'lfunc.c')
| -rw-r--r-- | lfunc.c | 10 |
1 files changed, 5 insertions, 5 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lfunc.c,v 1.35 2000/12/04 18:33:40 roberto Exp roberto $ | 2 | ** $Id: lfunc.c,v 1.36 2000/12/28 12:55:41 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 | */ |
| @@ -19,8 +19,8 @@ | |||
| 19 | 19 | ||
| 20 | Closure *luaF_newclosure (lua_State *L, int nelems) { | 20 | Closure *luaF_newclosure (lua_State *L, int nelems) { |
| 21 | Closure *c = (Closure *)luaM_malloc(L, sizeclosure(nelems)); | 21 | Closure *c = (Closure *)luaM_malloc(L, sizeclosure(nelems)); |
| 22 | c->next = L->rootcl; | 22 | c->next = G(L)->rootcl; |
| 23 | L->rootcl = c; | 23 | G(L)->rootcl = c; |
| 24 | c->mark = c; | 24 | c->mark = c; |
| 25 | c->nupvalues = nelems; | 25 | c->nupvalues = nelems; |
| 26 | return c; | 26 | return c; |
| @@ -47,8 +47,8 @@ Proto *luaF_newproto (lua_State *L) { | |||
| 47 | f->locvars = NULL; | 47 | f->locvars = NULL; |
| 48 | f->lineDefined = 0; | 48 | f->lineDefined = 0; |
| 49 | f->source = NULL; | 49 | f->source = NULL; |
| 50 | f->next = L->rootproto; /* chain in list of protos */ | 50 | f->next = G(L)->rootproto; /* chain in list of protos */ |
| 51 | L->rootproto = f; | 51 | G(L)->rootproto = f; |
| 52 | return f; | 52 | return f; |
| 53 | } | 53 | } |
| 54 | 54 | ||
