diff options
author | Lua Team <team@lua.org> | 2004-03-24 12:00:00 +0000 |
---|---|---|
committer | repogen <> | 2004-03-24 12:00:00 +0000 |
commit | ced7bbbe7a257ce6de94069d5dbf6672aeafd4d9 (patch) | |
tree | 2a01a79e6a4f451dccd247c70310ad957204cefa /src/lfunc.h | |
parent | e7731a8fb8a317aa5c444ef073bfad82fa5baa54 (diff) | |
download | lua-github-ced7bbbe7a257ce6de94069d5dbf6672aeafd4d9.tar.gz |
Lua 5.1-work05.1-work0
Diffstat (limited to 'src/lfunc.h')
-rw-r--r-- | src/lfunc.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/lfunc.h b/src/lfunc.h index 5d532507..04437601 100644 --- a/src/lfunc.h +++ b/src/lfunc.h @@ -1,5 +1,5 @@ /* -** $Id: lfunc.h,v 1.21 2003/03/18 12:50:04 roberto Exp $ +** $Id: lfunc.h,v 2.1 2003/12/10 12:13:36 roberto Exp $ ** Auxiliary functions to manipulate prototypes and closures ** See Copyright Notice in lua.h */ @@ -11,9 +11,17 @@ #include "lobject.h" +#define sizeCclosure(n) (cast(int, sizeof(CClosure)) + \ + cast(int, sizeof(TValue)*((n)-1))) + +#define sizeLclosure(n) (cast(int, sizeof(LClosure)) + \ + cast(int, sizeof(TValue *)*((n)-1))) + + Proto *luaF_newproto (lua_State *L); Closure *luaF_newCclosure (lua_State *L, int nelems); -Closure *luaF_newLclosure (lua_State *L, int nelems, TObject *e); +Closure *luaF_newLclosure (lua_State *L, int nelems, TValue *e); +UpVal *luaF_newupval (lua_State *L); UpVal *luaF_findupval (lua_State *L, StkId level); void luaF_close (lua_State *L, StkId level); void luaF_freeproto (lua_State *L, Proto *f); |