diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-01-19 11:20:30 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-01-19 11:20:30 -0200 |
commit | 4ac58853dc820127a11a14ed8bde1fae9458369e (patch) | |
tree | e8179692c97e935ba921c8ebd17abf9c8510d89e /lfunc.c | |
parent | f2c451d7455aad3496f32dfa2bfca7f7e8b5376d (diff) | |
download | lua-4ac58853dc820127a11a14ed8bde1fae9458369e.tar.gz lua-4ac58853dc820127a11a14ed8bde1fae9458369e.tar.bz2 lua-4ac58853dc820127a11a14ed8bde1fae9458369e.zip |
thead-specific state separated from "global" state
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 | ||