36#define LoadMem(S,b,n,size) LoadBlock(S,b,(n)*(size))
37#define LoadByte(S) (lu_byte)LoadChar(S)
38#define LoadVar(S,x) LoadMem(S,&x,1,sizeof(x))
39#define LoadVector(S,b,n,size) LoadMem(S,b,n,size)
41#if !defined(luai_verifycode)
42#define luai_verifycode(L,b,f)
61 if (x<0)
error(
S,
"corrupted");
127 for (i=0; i<n; i++) f->
p[i]=
NULL;
185#define N0 LUAC_HEADERSIZE
186#define N1 (sizeof(LUA_SIGNATURE)-sizeof(char))
195 memcpy(
s,h,
sizeof(
char));
197 if (memcmp(h,
s,
N0)==0)
return;
199 if (memcmp(h,
s,
N2)!=0)
error(
S,
"version mismatch in");
200 if (memcmp(h,
s,
N3)!=0)
error(
S,
"incompatible");
else error(
S,
"corrupted");
213 S.name=
"binary string";
235#define MYINT(s) (s[0]-'0')
236#define VERSION MYINT(LUA_VERSION_MAJOR)*16+MYINT(LUA_VERSION_MINOR)
void luaD_throw(lua_State *L, int errcode)
Proto * luaF_newproto(lua_State *L)
Closure * luaF_newLclosure(lua_State *L, int nelems, Table *e)
#define luaM_newvector(L, n, t)
const char * luaO_pushfstring(lua_State *L, const char *fmt,...)
#define setbvalue(obj, x)
#define setnvalue(obj, x)
TString * luaS_newlstr(lua_State *L, const char *str, size_t l)
size_t luaZ_read(ZIO *z, void *b, size_t n)
char * luaZ_openspace(lua_State *L, Mbuffer *buff, size_t n)
#define setclLvalue(L, obj, x)
static void LoadHeader(LoadState *S)
void luaU_header(lu_byte *h)
static void LoadConstants(LoadState *S, Proto *f)
static void LoadFunction(LoadState *S, Proto *f)
static TString * LoadString(LoadState *S)
static lua_Number LoadNumber(LoadState *S)
static l_noret error(LoadState *S, const char *why)
static void LoadBlock(LoadState *S, void *b, size_t size)
#define LoadVector(S, b, n, size)
static void LoadUpvalues(LoadState *S, Proto *f)
static void LoadDebug(LoadState *S, Proto *f)
Closure * luaU_undump(lua_State *L, ZIO *Z, Mbuffer *buff, const char *name)
static int LoadInt(LoadState *S)
#define luai_verifycode(L, b, f)
static void LoadCode(LoadState *S, Proto *f)
static int LoadChar(LoadState *S)
CURL_EXTERN CURLMcode curl_socket_t s