lundump.c File Reference

Go to the source code of this file.

Classes

struct  LoadState

Defines

#define lundump_c
#define LUA_CORE
#define IF(c, s)   if (c) error(S,s)
#define LoadMem(S, b, n, size)   LoadBlock(S,b,(n)*(size))
#define LoadByte(S)   (lu_byte)LoadChar(S)
#define LoadVar(S, x)   LoadMem(S,&x,1,sizeof(x))
#define LoadVector(S, b, n, size)   LoadMem(S,b,n,size)

Functions

static void error (LoadState *S, const char *why)
static void LoadBlock (LoadState *S, void *b, size_t size)
static int LoadChar (LoadState *S)
static int LoadInt (LoadState *S)
static lua_Number LoadNumber (LoadState *S)
static TString * LoadString (LoadState *S)
static void LoadCode (LoadState *S, Proto *f)
static Proto * LoadFunction (LoadState *S, TString *p)
static void LoadConstants (LoadState *S, Proto *f)
static void LoadDebug (LoadState *S, Proto *f)
static void LoadHeader (LoadState *S)
Proto * luaU_undump (lua_State *L, ZIO *Z, Mbuffer *buff, const char *name)
void luaU_header (char *h)

Define Documentation

#define IF ( c,
s   )     if (c) error(S,s)

Definition at line 34 of file lundump.c.

Referenced by LoadBlock(), LoadFunction(), LoadHeader(), and LoadInt().

#define LoadByte ( S   )     (lu_byte)LoadChar(S)

Definition at line 44 of file lundump.c.

Referenced by LoadFunction().

#define LoadMem ( S,
b,
n,
size   )     LoadBlock(S,b,(n)*(size))

Definition at line 43 of file lundump.c.

#define LoadVar ( S,
x   )     LoadMem(S,&x,1,sizeof(x))

Definition at line 45 of file lundump.c.

Referenced by LoadChar(), LoadInt(), LoadNumber(), and LoadString().

#define LoadVector ( S,
b,
n,
size   )     LoadMem(S,b,n,size)

Definition at line 46 of file lundump.c.

Referenced by LoadCode(), and LoadDebug().

#define LUA_CORE

Definition at line 10 of file lundump.c.

#define lundump_c

Definition at line 9 of file lundump.c.


Function Documentation

static void error ( LoadState *  S,
const char *  why 
) [static]
static void LoadBlock ( LoadState *  S,
void *  b,
size_t  size 
) [static]

Definition at line 48 of file lundump.c.

References IF, luaZ_read(), and LoadState::Z.

Referenced by LoadHeader(), and LoadString().

static int LoadChar ( LoadState *  S  )  [static]

Definition at line 54 of file lundump.c.

References LoadVar.

Referenced by LoadConstants().

static void LoadCode ( LoadState *  S,
Proto *  f 
) [static]

Definition at line 90 of file lundump.c.

References Proto::code, LoadState::L, LoadInt(), LoadVector, luaM_newvector, and Proto::sizecode.

Referenced by LoadFunction().

static void LoadConstants ( LoadState *  S,
Proto *  f 
) [static]
static void LoadDebug ( LoadState *  S,
Proto *  f 
) [static]
static Proto * LoadFunction ( LoadState *  S,
TString *  p 
) [static]
static void LoadHeader ( LoadState *  S  )  [static]

Definition at line 183 of file lundump.c.

References IF, LoadBlock(), LUAC_HEADERSIZE, and luaU_header().

Referenced by luaU_undump().

static int LoadInt ( LoadState *  S  )  [static]

Definition at line 61 of file lundump.c.

References IF, and LoadVar.

Referenced by LoadCode(), LoadConstants(), LoadDebug(), and LoadFunction().

static lua_Number LoadNumber ( LoadState *  S  )  [static]

Definition at line 69 of file lundump.c.

References LoadVar.

Referenced by LoadConstants().

static TString* LoadString ( LoadState *  S  )  [static]

Definition at line 76 of file lundump.c.

References LoadState::b, LoadState::L, LoadBlock(), LoadVar, luaS_newlstr(), and luaZ_openspace().

Referenced by LoadConstants(), LoadDebug(), and LoadFunction().

void luaU_header ( char *  h  ) 

Definition at line 214 of file lundump.c.

References LUA_SIGNATURE, LUAC_FORMAT, and LUAC_VERSION.

Referenced by DumpHeader(), and LoadHeader().

Proto* luaU_undump ( lua_State *  L,
ZIO *  Z,
Mbuffer *  buff,
const char *  name 
)

ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:50:00 2011 by Doxygen 1.6.1