lundump.h 765 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. ** $Id: lundump.h,v 1.39 2012/05/08 13:53:33 roberto Exp roberto $
  3. ** load precompiled Lua chunks
  4. ** See Copyright Notice in lua.h
  5. */
  6. #ifndef lundump_h
  7. #define lundump_h
  8. #include "lobject.h"
  9. #include "lzio.h"
  10. /* data to catch conversion errors */
  11. #define LUAC_DATA "\x19\x93\r\n\x1a\n"
  12. #define LUAC_INT 0xABCD
  13. #define LUAC_NUM 370.5
  14. #define MYINT(s) (s[0]-'0')
  15. #define LUAC_VERSION (MYINT(LUA_VERSION_MAJOR)*16+MYINT(LUA_VERSION_MINOR))
  16. #define LUAC_FORMAT 0 /* this is the official format */
  17. /* load one chunk; from lundump.c */
  18. LUAI_FUNC Closure* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name);
  19. /* dump one chunk; from ldump.c */
  20. LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip);
  21. #endif