From 4ac58853dc820127a11a14ed8bde1fae9458369e Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 19 Jan 2001 11:20:30 -0200 Subject: thead-specific state separated from "global" state --- lfunc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lfunc.c') diff --git a/lfunc.c b/lfunc.c index 14ef5e15..ef9d3c3b 100644 --- a/lfunc.c +++ b/lfunc.c @@ -1,5 +1,5 @@ /* -** $Id: lfunc.c,v 1.35 2000/12/04 18:33:40 roberto Exp roberto $ +** $Id: lfunc.c,v 1.36 2000/12/28 12:55:41 roberto Exp roberto $ ** Auxiliary functions to manipulate prototypes and closures ** See Copyright Notice in lua.h */ @@ -19,8 +19,8 @@ Closure *luaF_newclosure (lua_State *L, int nelems) { Closure *c = (Closure *)luaM_malloc(L, sizeclosure(nelems)); - c->next = L->rootcl; - L->rootcl = c; + c->next = G(L)->rootcl; + G(L)->rootcl = c; c->mark = c; c->nupvalues = nelems; return c; @@ -47,8 +47,8 @@ Proto *luaF_newproto (lua_State *L) { f->locvars = NULL; f->lineDefined = 0; f->source = NULL; - f->next = L->rootproto; /* chain in list of protos */ - L->rootproto = f; + f->next = G(L)->rootproto; /* chain in list of protos */ + G(L)->rootproto = f; return f; } -- cgit v1.2.3-55-g6feb