From 115087344797d0aafb23f4fe5b902fdebd2c3310 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 11 Sep 2013 09:26:14 -0300 Subject: 'luaC_newobj' does not handle special cases; only special case now is threads, which do not use 'luaC_newobj' anymore. --- lfunc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lfunc.c') diff --git a/lfunc.c b/lfunc.c index 0db0a87b..3727b6cf 100644 --- a/lfunc.c +++ b/lfunc.c @@ -1,5 +1,5 @@ /* -** $Id: lfunc.c,v 2.36 2013/08/27 18:53:35 roberto Exp roberto $ +** $Id: lfunc.c,v 2.37 2013/08/27 20:04:00 roberto Exp roberto $ ** Auxiliary functions to manipulate prototypes and closures ** See Copyright Notice in lua.h */ @@ -21,14 +21,14 @@ Closure *luaF_newCclosure (lua_State *L, int n) { - Closure *c = &luaC_newobj(L, LUA_TCCL, sizeCclosure(n), NULL, 0)->cl; + Closure *c = &luaC_newobj(L, LUA_TCCL, sizeCclosure(n))->cl; c->c.nupvalues = cast_byte(n); return c; } Closure *luaF_newLclosure (lua_State *L, int n) { - Closure *c = &luaC_newobj(L, LUA_TLCL, sizeLclosure(n), NULL, 0)->cl; + Closure *c = &luaC_newobj(L, LUA_TLCL, sizeLclosure(n))->cl; c->l.p = NULL; c->l.nupvalues = cast_byte(n); while (n--) c->l.upvals[n] = NULL; @@ -85,7 +85,7 @@ void luaF_close (lua_State *L, StkId level) { Proto *luaF_newproto (lua_State *L) { - Proto *f = &luaC_newobj(L, LUA_TPROTO, sizeof(Proto), &G(L)->allgc, 0)->p; + Proto *f = &luaC_newobj(L, LUA_TPROTO, sizeof(Proto))->p; nolocal(obj2gco(f)); /* prototypes are never local */ f->k = NULL; f->sizek = 0; -- cgit v1.2.3-55-g6feb