diff options
Diffstat (limited to 'lfunc.c')
-rw-r--r-- | lfunc.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lfunc.c,v 1.55 2002/03/25 17:47:14 roberto Exp roberto $ | 2 | ** $Id: lfunc.c,v 1.56 2002/05/02 13:06:20 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,12 +34,13 @@ Closure *luaF_newCclosure (lua_State *L, int nelems) { | |||
34 | } | 34 | } |
35 | 35 | ||
36 | 36 | ||
37 | Closure *luaF_newLclosure (lua_State *L, int nelems) { | 37 | Closure *luaF_newLclosure (lua_State *L, int nelems, TObject *gt) { |
38 | Closure *c = cast(Closure *, luaM_malloc(L, sizeLclosure(nelems))); | 38 | Closure *c = cast(Closure *, luaM_malloc(L, sizeLclosure(nelems))); |
39 | c->l.isC = 0; | 39 | c->l.isC = 0; |
40 | c->c.next = G(L)->rootcl; | 40 | c->c.next = G(L)->rootcl; |
41 | G(L)->rootcl = c; | 41 | G(L)->rootcl = c; |
42 | c->l.marked = 0; | 42 | c->l.marked = 0; |
43 | c->l.g = *gt; | ||
43 | c->l.nupvalues = cast(lu_byte, nelems); | 44 | c->l.nupvalues = cast(lu_byte, nelems); |
44 | return c; | 45 | return c; |
45 | } | 46 | } |