2
0

lundump.h 903 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. ** $Id: lundump.h $
  3. ** load precompiled Lua chunks
  4. ** See Copyright Notice in lua.h
  5. */
  6. #ifndef lundump_h
  7. #define lundump_h
  8. #include <limits.h>
  9. #include "llimits.h"
  10. #include "lobject.h"
  11. #include "lzio.h"
  12. /* data to catch conversion errors */
  13. #define LUAC_DATA "\x19\x93\r\n\x1a\n"
  14. #define LUAC_INT -0x5678
  15. #define LUAC_INST 0x12345678
  16. #define LUAC_NUM cast_num(-370.5)
  17. /*
  18. ** Encode major-minor version in one byte, one nibble for each
  19. */
  20. #define LUAC_VERSION (LUA_VERSION_MAJOR_N*16+LUA_VERSION_MINOR_N)
  21. #define LUAC_FORMAT 0 /* this is the official format */
  22. /* load one chunk; from lundump.c */
  23. LUAI_FUNC LClosure* luaU_undump (lua_State* L, ZIO* Z, const char* name,
  24. int fixed);
  25. /* dump one chunk; from ldump.c */
  26. LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w,
  27. void* data, int strip);
  28. #endif