diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-11-24 16:50:36 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-11-24 16:50:36 -0200 |
commit | 5ee63257f9eee2216b6ed06afa93aceac3227fb4 (patch) | |
tree | e6f265aebc65df1d0308aad77566b3db2444680b /lfunc.c | |
parent | 8bc6c680219f6fe7dd96ea17235484b0ded5fc15 (diff) | |
download | lua-5ee63257f9eee2216b6ed06afa93aceac3227fb4.tar.gz lua-5ee63257f9eee2216b6ed06afa93aceac3227fb4.tar.bz2 lua-5ee63257f9eee2216b6ed06afa93aceac3227fb4.zip |
macros for closure sizes are global
Diffstat (limited to 'lfunc.c')
-rw-r--r-- | lfunc.c | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lfunc.c,v 1.70 2003/11/17 19:50:05 roberto Exp roberto $ | 2 | ** $Id: lfunc.c,v 1.71 2003/11/19 19:41:30 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 | */ |
@@ -18,13 +18,6 @@ | |||
18 | #include "lstate.h" | 18 | #include "lstate.h" |
19 | 19 | ||
20 | 20 | ||
21 | #define sizeCclosure(n) (cast(int, sizeof(CClosure)) + \ | ||
22 | cast(int, sizeof(TObject)*((n)-1))) | ||
23 | |||
24 | #define sizeLclosure(n) (cast(int, sizeof(LClosure)) + \ | ||
25 | cast(int, sizeof(TObject *)*((n)-1))) | ||
26 | |||
27 | |||
28 | 21 | ||
29 | Closure *luaF_newCclosure (lua_State *L, int nelems) { | 22 | Closure *luaF_newCclosure (lua_State *L, int nelems) { |
30 | Closure *c = cast(Closure *, luaM_malloc(L, sizeCclosure(nelems))); | 23 | Closure *c = cast(Closure *, luaM_malloc(L, sizeCclosure(nelems))); |