aboutsummaryrefslogtreecommitdiff
path: root/lfunc.c
diff options
context:
space:
mode:
Diffstat (limited to 'lfunc.c')
-rw-r--r--lfunc.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lfunc.c b/lfunc.c
index f4e30faa..daa430c6 100644
--- a/lfunc.c
+++ b/lfunc.c
@@ -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
24Closure *luaF_newCclosure (lua_State *L, int n, Table *e) { 24Closure *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
33Closure *luaF_newLclosure (lua_State *L, int n, Table *e) { 32Closure *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;