diff options
Diffstat (limited to 'lfunc.c')
-rw-r--r-- | lfunc.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lfunc.c,v 2.36 2013/08/27 18:53:35 roberto Exp roberto $ | 2 | ** $Id: lfunc.c,v 2.37 2013/08/27 20:04:00 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 | */ |
@@ -21,14 +21,14 @@ | |||
21 | 21 | ||
22 | 22 | ||
23 | Closure *luaF_newCclosure (lua_State *L, int n) { | 23 | Closure *luaF_newCclosure (lua_State *L, int n) { |
24 | Closure *c = &luaC_newobj(L, LUA_TCCL, sizeCclosure(n), NULL, 0)->cl; | 24 | Closure *c = &luaC_newobj(L, LUA_TCCL, sizeCclosure(n))->cl; |
25 | c->c.nupvalues = cast_byte(n); | 25 | c->c.nupvalues = cast_byte(n); |
26 | return c; | 26 | return c; |
27 | } | 27 | } |
28 | 28 | ||
29 | 29 | ||
30 | Closure *luaF_newLclosure (lua_State *L, int n) { | 30 | Closure *luaF_newLclosure (lua_State *L, int n) { |
31 | Closure *c = &luaC_newobj(L, LUA_TLCL, sizeLclosure(n), NULL, 0)->cl; | 31 | Closure *c = &luaC_newobj(L, LUA_TLCL, sizeLclosure(n))->cl; |
32 | c->l.p = NULL; | 32 | c->l.p = NULL; |
33 | c->l.nupvalues = cast_byte(n); | 33 | c->l.nupvalues = cast_byte(n); |
34 | while (n--) c->l.upvals[n] = NULL; | 34 | while (n--) c->l.upvals[n] = NULL; |
@@ -85,7 +85,7 @@ void luaF_close (lua_State *L, StkId level) { | |||
85 | 85 | ||
86 | 86 | ||
87 | Proto *luaF_newproto (lua_State *L) { | 87 | Proto *luaF_newproto (lua_State *L) { |
88 | Proto *f = &luaC_newobj(L, LUA_TPROTO, sizeof(Proto), &G(L)->allgc, 0)->p; | 88 | Proto *f = &luaC_newobj(L, LUA_TPROTO, sizeof(Proto))->p; |
89 | nolocal(obj2gco(f)); /* prototypes are never local */ | 89 | nolocal(obj2gco(f)); /* prototypes are never local */ |
90 | f->k = NULL; | 90 | f->k = NULL; |
91 | f->sizek = 0; | 91 | f->sizek = 0; |