lundump.h 976 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. ** $Id: lundump.h,v 1.26 2002/08/07 00:36:03 lhf Exp $
  3. ** load pre-compiled 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. typedef int (*Writer)(const void* p, size_t size, void* u);
  11. /* load one chunk; from lundump.c */
  12. Proto* luaU_undump (lua_State* L, ZIO* Z);
  13. /* find byte order; from lundump.c */
  14. int luaU_endianness (void);
  15. /* dump one chunk; from dump.c */
  16. void luaU_dump (const Proto* Main, Writer w, void* data);
  17. /* print one chunk; from print.c */
  18. void luaU_print (const Proto* Main);
  19. /* definitions for headers of binary files */
  20. #define LUA_SIGNATURE "\033Lua" /* binary files start with <esc>Lua */
  21. #define VERSION 0x50 /* last format change was in 5.0 */
  22. #define VERSION0 0x50 /* last major change was in 5.0 */
  23. /* a multiple of PI for testing native format */
  24. /* multiplying by 1E8 gives non-trivial integer values */
  25. #define TEST_NUMBER 3.14159265358979323846E8
  26. #endif