aboutsummaryrefslogtreecommitdiff
path: root/lfunc.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-11-24 16:50:36 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-11-24 16:50:36 -0200
commit5ee63257f9eee2216b6ed06afa93aceac3227fb4 (patch)
treee6f265aebc65df1d0308aad77566b3db2444680b /lfunc.h
parent8bc6c680219f6fe7dd96ea17235484b0ded5fc15 (diff)
downloadlua-5ee63257f9eee2216b6ed06afa93aceac3227fb4.tar.gz
lua-5ee63257f9eee2216b6ed06afa93aceac3227fb4.tar.bz2
lua-5ee63257f9eee2216b6ed06afa93aceac3227fb4.zip
macros for closure sizes are global
Diffstat (limited to 'lfunc.h')
-rw-r--r--lfunc.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/lfunc.h b/lfunc.h
index ae55e289..bb0fa001 100644
--- a/lfunc.h
+++ b/lfunc.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lfunc.h,v 1.21 2003/03/18 12:50:04 roberto Exp roberto $ 2** $Id: lfunc.h,v 1.22 2003/10/20 17:42: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*/
@@ -11,6 +11,13 @@
11#include "lobject.h" 11#include "lobject.h"
12 12
13 13
14#define sizeCclosure(n) (cast(int, sizeof(CClosure)) + \
15 cast(int, sizeof(TObject)*((n)-1)))
16
17#define sizeLclosure(n) (cast(int, sizeof(LClosure)) + \
18 cast(int, sizeof(TObject *)*((n)-1)))
19
20
14Proto *luaF_newproto (lua_State *L); 21Proto *luaF_newproto (lua_State *L);
15Closure *luaF_newCclosure (lua_State *L, int nelems); 22Closure *luaF_newCclosure (lua_State *L, int nelems);
16Closure *luaF_newLclosure (lua_State *L, int nelems, TObject *e); 23Closure *luaF_newLclosure (lua_State *L, int nelems, TObject *e);