35 #define LoadMem(S,b,n,size) LoadBlock(S,b,(n)*(size))
36 #define LoadByte(S) (lu_byte)LoadChar(S)
37 #define LoadVar(S,x) LoadMem(S,&x,1,sizeof(x))
38 #define LoadVector(S,b,n,size) LoadMem(S,b,n,size)
40 #if !defined(luai_verifycode)
41 #define luai_verifycode(L,b,f)
60 if (x<0)
error(S,
"corrupted");
126 for (i=0; i<
n; i++) f->
p[i]=NULL;
184 #define N0 LUAC_HEADERSIZE
185 #define N1 (sizeof(LUA_SIGNATURE)-sizeof(char))
194 memcpy(s,h,
sizeof(
char));
196 if (memcmp(h,s,
N0)==0)
return;
197 if (memcmp(h,s,
N1)!=0)
error(S,
"not a");
198 if (memcmp(h,s,
N2)!=0)
error(S,
"version mismatch in");
199 if (memcmp(h,s,
N3)!=0)
error(S,
"incompatible");
else error(S,
"corrupted");
209 if (*name==
'@' || *name==
'=')
212 S.
name=
"binary string";
234 #define MYINT(s) (s[0]-'0')
235 #define VERSION MYINT(LUA_VERSION_MAJOR)*16+MYINT(LUA_VERSION_MINOR)
#define luaM_newvector(L, n, t)
static void LoadBlock(LoadState *S, void *b, size_t size)
#define setbvalue(obj, x)
#define luai_verifycode(L, b, f)
Closure * luaF_newLclosure(lua_State *L, int n)
Proto * luaF_newproto(lua_State *L)
static l_noret error(LoadState *S, const char *why)
static int LoadInt(LoadState *S)
#define setnvalue(obj, x)
Closure * luaU_undump(lua_State *L, ZIO *Z, Mbuffer *buff, const char *name)
static void LoadCode(LoadState *S, Proto *f)
static void LoadDebug(LoadState *S, Proto *f)
static void LoadUpvalues(LoadState *S, Proto *f)
static void LoadFunction(LoadState *S, Proto *f)
GLdouble GLdouble GLdouble b
static TString * LoadString(LoadState *S)
static void LoadHeader(LoadState *S)
l_noret luaD_throw(lua_State *L, int errcode)
static lua_Number LoadNumber(LoadState *S)
static void LoadConstants(LoadState *S, Proto *f)
#define LoadVector(S, b, n, size)
#define setclLvalue(L, obj, x)
GLfloat GLfloat GLfloat GLfloat h
GLint GLint GLint GLint GLint x
const char * luaO_pushfstring(lua_State *L, const char *fmt,...)
GLuint const GLchar * name
size_t luaZ_read(ZIO *z, void *b, size_t n)
void luaU_header(lu_byte *h)
char * luaZ_openspace(lua_State *L, Mbuffer *buff, size_t n)
TString * luaS_newlstr(lua_State *L, const char *str, size_t l)
static int LoadChar(LoadState *S)