Mercurial > vba-linux
diff src/lua/lfunc.h @ 11:27763b933818
raise lua sources up one level
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Mar 2012 11:07:39 -0600 |
parents | src/lua/src/lfunc.h@f9f4f1b99eed |
children |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/lua/lfunc.h Sat Mar 03 11:07:39 2012 -0600 1.3 @@ -0,0 +1,34 @@ 1.4 +/* 1.5 +** $Id: lfunc.h,v 2.4.1.1 2007/12/27 13:02:25 roberto Exp $ 1.6 +** Auxiliary functions to manipulate prototypes and closures 1.7 +** See Copyright Notice in lua.h 1.8 +*/ 1.9 + 1.10 +#ifndef lfunc_h 1.11 +#define lfunc_h 1.12 + 1.13 + 1.14 +#include "lobject.h" 1.15 + 1.16 + 1.17 +#define sizeCclosure(n) (cast(int, sizeof(CClosure)) + \ 1.18 + cast(int, sizeof(TValue)*((n)-1))) 1.19 + 1.20 +#define sizeLclosure(n) (cast(int, sizeof(LClosure)) + \ 1.21 + cast(int, sizeof(TValue *)*((n)-1))) 1.22 + 1.23 + 1.24 +LUAI_FUNC Proto *luaF_newproto (lua_State *L); 1.25 +LUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems, Table *e); 1.26 +LUAI_FUNC Closure *luaF_newLclosure (lua_State *L, int nelems, Table *e); 1.27 +LUAI_FUNC UpVal *luaF_newupval (lua_State *L); 1.28 +LUAI_FUNC UpVal *luaF_findupval (lua_State *L, StkId level); 1.29 +LUAI_FUNC void luaF_close (lua_State *L, StkId level); 1.30 +LUAI_FUNC void luaF_freeproto (lua_State *L, Proto *f); 1.31 +LUAI_FUNC void luaF_freeclosure (lua_State *L, Closure *c); 1.32 +LUAI_FUNC void luaF_freeupval (lua_State *L, UpVal *uv); 1.33 +LUAI_FUNC const char *luaF_getlocalname (const Proto *func, int local_number, 1.34 + int pc); 1.35 + 1.36 + 1.37 +#endif