aboutsummaryrefslogtreecommitdiff
path: root/lfunc.c
diff options
context:
space:
mode:
Diffstat (limited to 'lfunc.c')
-rw-r--r--lfunc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lfunc.c b/lfunc.c
index 27143635..8893fa5b 100644
--- a/lfunc.c
+++ b/lfunc.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lfunc.c,v 1.21 2000/03/29 20:19:20 roberto Exp roberto $ 2** $Id: lfunc.c,v 1.22 2000/05/24 13:54:49 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*/
@@ -14,7 +14,7 @@
14#include "lstate.h" 14#include "lstate.h"
15 15
16#define gcsizeproto(L, p) numblocks(L, 0, sizeof(Proto)) 16#define gcsizeproto(L, p) numblocks(L, 0, sizeof(Proto))
17#define gcsizeclosure(L, c) numblocks(L, c->nelems, sizeof(Closure)) 17#define gcsizeclosure(L, c) numblocks(L, c->nupvalues, sizeof(Closure))
18 18
19 19
20 20
@@ -24,7 +24,7 @@ Closure *luaF_newclosure (lua_State *L, int nelems) {
24 c->next = L->rootcl; 24 c->next = L->rootcl;
25 L->rootcl = c; 25 L->rootcl = c;
26 c->marked = 0; 26 c->marked = 0;
27 c->nelems = nelems; 27 c->nupvalues = nelems;
28 L->nblocks += gcsizeclosure(L, c); 28 L->nblocks += gcsizeclosure(L, c);
29 return c; 29 return c;
30} 30}