lfunc.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #ifndef lfunc_h
00008 #define lfunc_h
00009
00010
00011 #include "lobject.h"
00012
00013
00014 #define sizeCclosure(n) (cast(int, sizeof(CClosure)) + \
00015 cast(int, sizeof(TValue)*((n)-1)))
00016
00017 #define sizeLclosure(n) (cast(int, sizeof(LClosure)) + \
00018 cast(int, sizeof(TValue *)*((n)-1)))
00019
00020
00021 LUAI_FUNC Proto *luaF_newproto (lua_State *L);
00022 LUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems, Table *e);
00023 LUAI_FUNC Closure *luaF_newLclosure (lua_State *L, int nelems, Table *e);
00024 LUAI_FUNC UpVal *luaF_newupval (lua_State *L);
00025 LUAI_FUNC UpVal *luaF_findupval (lua_State *L, StkId level);
00026 LUAI_FUNC void luaF_close (lua_State *L, StkId level);
00027 LUAI_FUNC void luaF_freeproto (lua_State *L, Proto *f);
00028 LUAI_FUNC void luaF_freeclosure (lua_State *L, Closure *c);
00029 LUAI_FUNC void luaF_freeupval (lua_State *L, UpVal *uv);
00030 LUAI_FUNC const char *luaF_getlocalname (const Proto *func, int local_number,
00031 int pc);
00032
00033
00034 #endif