release.sh changes & fixes
[minix3.git] / external / mit / lua / dist / src / lfunc.h
blobccbf349bc67a2bce71a937c0d24eadc698fea499
1 /* $NetBSD: lfunc.h,v 1.1.1.2 2012/03/15 00:08:04 alnsn Exp $ */
3 /*
4 ** $Id: lfunc.h,v 1.1.1.2 2012/03/15 00:08:04 alnsn Exp $
5 ** Auxiliary functions to manipulate prototypes and closures
6 ** See Copyright Notice in lua.h
7 */
9 #ifndef lfunc_h
10 #define lfunc_h
13 #include "lobject.h"
16 #define sizeCclosure(n) (cast(int, sizeof(CClosure)) + \
17 cast(int, sizeof(TValue)*((n)-1)))
19 #define sizeLclosure(n) (cast(int, sizeof(LClosure)) + \
20 cast(int, sizeof(TValue *)*((n)-1)))
23 LUAI_FUNC Proto *luaF_newproto (lua_State *L);
24 LUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems, Table *e);
25 LUAI_FUNC Closure *luaF_newLclosure (lua_State *L, int nelems, Table *e);
26 LUAI_FUNC UpVal *luaF_newupval (lua_State *L);
27 LUAI_FUNC UpVal *luaF_findupval (lua_State *L, StkId level);
28 LUAI_FUNC void luaF_close (lua_State *L, StkId level);
29 LUAI_FUNC void luaF_freeproto (lua_State *L, Proto *f);
30 LUAI_FUNC void luaF_freeclosure (lua_State *L, Closure *c);
31 LUAI_FUNC void luaF_freeupval (lua_State *L, UpVal *uv);
32 LUAI_FUNC const char *luaF_getlocalname (const Proto *func, int local_number,
33 int pc);
36 #endif