Imported from ../lua-5.0.3.tar.gz.
[lua.git] / src / lfunc.h
blobdc61e2ed43f7efade06e09ca1f96be611ec8096b
1 /*
2 ** $Id: lfunc.h,v 1.21a 2003/03/18 12:50:04 roberto Exp $
3 ** Auxiliary functions to manipulate prototypes and closures
4 ** See Copyright Notice in lua.h
5 */
7 #ifndef lfunc_h
8 #define lfunc_h
11 #include "lobject.h"
14 #define sizeCclosure(n) (cast(int, sizeof(CClosure)) + \
15 cast(int, sizeof(TObject)*((n)-1)))
17 #define sizeLclosure(n) (cast(int, sizeof(LClosure)) + \
18 cast(int, sizeof(TObject *)*((n)-1)))
21 Proto *luaF_newproto (lua_State *L);
22 Closure *luaF_newCclosure (lua_State *L, int nelems);
23 Closure *luaF_newLclosure (lua_State *L, int nelems, TObject *e);
24 UpVal *luaF_findupval (lua_State *L, StkId level);
25 void luaF_close (lua_State *L, StkId level);
26 void luaF_freeproto (lua_State *L, Proto *f);
27 void luaF_freeclosure (lua_State *L, Closure *c);
29 const char *luaF_getlocalname (const Proto *func, int local_number, int pc);
32 #endif