diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-04-12 15:48:47 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-04-12 15:48:47 -0300 |
commit | 2ca518141350667e38941eac35b76980095d2fdc (patch) | |
tree | 82595f0dfd57df5782905621298c8aae68b46389 /lfunc.h | |
parent | f5ae26ec6c2eb69f03f316e59c1e1977c52c7c23 (diff) | |
download | lua-2ca518141350667e38941eac35b76980095d2fdc.tar.gz lua-2ca518141350667e38941eac35b76980095d2fdc.tar.bz2 lua-2ca518141350667e38941eac35b76980095d2fdc.zip |
Branch 5.2 - new releases for 5.2 go from here, main trunk goes
for next version
Diffstat (limited to 'lfunc.h')
-rw-r--r-- | lfunc.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/lfunc.h b/lfunc.h new file mode 100644 index 00000000..e236a717 --- /dev/null +++ b/lfunc.h | |||
@@ -0,0 +1,33 @@ | |||
1 | /* | ||
2 | ** $Id: lfunc.h,v 2.8 2012/05/08 13:53:33 roberto Exp $ | ||
3 | ** Auxiliary functions to manipulate prototypes and closures | ||
4 | ** See Copyright Notice in lua.h | ||
5 | */ | ||
6 | |||
7 | #ifndef lfunc_h | ||
8 | #define lfunc_h | ||
9 | |||
10 | |||
11 | #include "lobject.h" | ||
12 | |||
13 | |||
14 | #define sizeCclosure(n) (cast(int, sizeof(CClosure)) + \ | ||
15 | cast(int, sizeof(TValue)*((n)-1))) | ||
16 | |||
17 | #define sizeLclosure(n) (cast(int, sizeof(LClosure)) + \ | ||
18 | cast(int, sizeof(TValue *)*((n)-1))) | ||
19 | |||
20 | |||
21 | LUAI_FUNC Proto *luaF_newproto (lua_State *L); | ||
22 | LUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems); | ||
23 | LUAI_FUNC Closure *luaF_newLclosure (lua_State *L, int nelems); | ||
24 | LUAI_FUNC UpVal *luaF_newupval (lua_State *L); | ||
25 | LUAI_FUNC UpVal *luaF_findupval (lua_State *L, StkId level); | ||
26 | LUAI_FUNC void luaF_close (lua_State *L, StkId level); | ||
27 | LUAI_FUNC void luaF_freeproto (lua_State *L, Proto *f); | ||
28 | LUAI_FUNC void luaF_freeupval (lua_State *L, UpVal *uv); | ||
29 | LUAI_FUNC const char *luaF_getlocalname (const Proto *func, int local_number, | ||
30 | int pc); | ||
31 | |||
32 | |||
33 | #endif | ||