lfunc.h 826 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. ** $Id: lfunc.h,v 1.15 2001/02/23 17:17:25 roberto Exp $
  3. ** Auxiliary functions to manipulate prototypes and closures
  4. ** See Copyright Notice in lua.h
  5. */
  6. #ifndef lfunc_h
  7. #define lfunc_h
  8. #include "lobject.h"
  9. #define luaF_isclosed(c, i) (!((c)->u.l.isopen & (1 << (i))))
  10. #define luaF_openentry(c, i) ((c)->u.l.isopen |= (1 << (i)))
  11. #define luaF_closeentry(c, i) ((c)->u.l.isopen &= ~(1 << (i)))
  12. Proto *luaF_newproto (lua_State *L);
  13. Closure *luaF_newCclosure (lua_State *L, int nelems);
  14. Closure *luaF_newLclosure (lua_State *L, int nelems);
  15. void luaF_LConlist (lua_State *L, Closure *cl);
  16. void luaF_close (lua_State *L, StkId level);
  17. void luaF_freeproto (lua_State *L, Proto *f);
  18. void luaF_freeclosure (lua_State *L, Closure *c);
  19. const l_char *luaF_getlocalname (const Proto *func, int local_number, int pc);
  20. #endif