1998-01-14 13:49:01 -02:00
|
|
|
/*
|
2018-08-23 14:26:12 -03:00
|
|
|
** $Id: lundump.h $
|
2005-11-16 09:55:07 -02:00
|
|
|
** load precompiled Lua chunks
|
1998-01-14 13:49:01 -02:00
|
|
|
** See Copyright Notice in lua.h
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef lundump_h
|
|
|
|
#define lundump_h
|
|
|
|
|
2014-03-11 11:22:54 -03:00
|
|
|
#include "llimits.h"
|
1998-01-14 13:49:01 -02:00
|
|
|
#include "lobject.h"
|
|
|
|
#include "lzio.h"
|
|
|
|
|
2014-02-27 13:56:20 -03:00
|
|
|
|
|
|
|
/* data to catch conversion errors */
|
|
|
|
#define LUAC_DATA "\x19\x93\r\n\x1a\n"
|
|
|
|
|
2014-04-15 11:29:30 -03:00
|
|
|
#define LUAC_INT 0x5678
|
2014-03-11 11:22:54 -03:00
|
|
|
#define LUAC_NUM cast_num(370.5)
|
2014-02-27 13:56:20 -03:00
|
|
|
|
2020-05-06 14:19:08 -03:00
|
|
|
/*
|
|
|
|
** Encode major-minor version in one byte, one nibble for each
|
|
|
|
*/
|
2020-05-07 14:52:19 -03:00
|
|
|
#define MYINT(s) (s[0]-'0') /* assume one-digit numerals */
|
2020-05-06 14:19:08 -03:00
|
|
|
#define LUAC_VERSION (MYINT(LUA_VERSION_MAJOR)*16+MYINT(LUA_VERSION_MINOR))
|
|
|
|
|
2014-02-27 13:56:20 -03:00
|
|
|
#define LUAC_FORMAT 0 /* this is the official format */
|
|
|
|
|
2002-06-05 14:26:23 -03:00
|
|
|
/* load one chunk; from lundump.c */
|
2015-09-08 12:41:05 -03:00
|
|
|
LUAI_FUNC LClosure* luaU_undump (lua_State* L, ZIO* Z, const char* name);
|
1999-12-02 17:11:51 -02:00
|
|
|
|
2003-01-27 13:52:57 -02:00
|
|
|
/* dump one chunk; from ldump.c */
|
2014-03-10 16:52:47 -03:00
|
|
|
LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w,
|
|
|
|
void* data, int strip);
|
2002-06-05 14:26:23 -03:00
|
|
|
|
1999-03-30 17:29:34 -03:00
|
|
|
#endif
|