diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-03-26 17:58:11 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-03-26 17:58:11 -0300 |
commit | 064e406f67c0153999a5246deb1d616b06ee9bb0 (patch) | |
tree | f4483ab6ad6d55484829a0d8a27b8afa1768a36e /lfunc.c | |
parent | 5c87f61e6b1567400d2bd8f452939bb948f16dda (diff) | |
download | lua-064e406f67c0153999a5246deb1d616b06ee9bb0.tar.gz lua-064e406f67c0153999a5246deb1d616b06ee9bb0.tar.bz2 lua-064e406f67c0153999a5246deb1d616b06ee9bb0.zip |
no more fenvs!
Diffstat (limited to '')
-rw-r--r-- | lfunc.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lfunc.c,v 2.19 2009/12/16 16:42:58 roberto Exp roberto $ | 2 | ** $Id: lfunc.c,v 2.20 2010/03/12 19:14:06 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,19 +21,17 @@ | |||
21 | 21 | ||
22 | 22 | ||
23 | 23 | ||
24 | Closure *luaF_newCclosure (lua_State *L, int n, Table *e) { | 24 | Closure *luaF_newCclosure (lua_State *L, int n) { |
25 | Closure *c = &luaC_newobj(L, LUA_TFUNCTION, sizeCclosure(n), NULL, 0)->cl; | 25 | Closure *c = &luaC_newobj(L, LUA_TFUNCTION, sizeCclosure(n), NULL, 0)->cl; |
26 | c->c.isC = 1; | 26 | c->c.isC = 1; |
27 | c->c.env = e; | ||
28 | c->c.nupvalues = cast_byte(n); | 27 | c->c.nupvalues = cast_byte(n); |
29 | return c; | 28 | return c; |
30 | } | 29 | } |
31 | 30 | ||
32 | 31 | ||
33 | Closure *luaF_newLclosure (lua_State *L, int n, Table *e) { | 32 | Closure *luaF_newLclosure (lua_State *L, int n) { |
34 | Closure *c = &luaC_newobj(L, LUA_TFUNCTION, sizeLclosure(n), NULL, 0)->cl; | 33 | Closure *c = &luaC_newobj(L, LUA_TFUNCTION, sizeLclosure(n), NULL, 0)->cl; |
35 | c->l.isC = 0; | 34 | c->l.isC = 0; |
36 | c->l.env = e; | ||
37 | c->l.nupvalues = cast_byte(n); | 35 | c->l.nupvalues = cast_byte(n); |
38 | while (n--) c->l.upvals[n] = NULL; | 36 | while (n--) c->l.upvals[n] = NULL; |
39 | return c; | 37 | return c; |