1 /* $NetBSD: lfunc.h,v 1.1.1.2 2012/03/15 00:08:04 alnsn Exp $ */
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
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
,