include/libmangle.h File Reference

Go to the source code of this file.

Data Structures

struct  sGcCtx

Typedefs

typedef void * pGcElem
typedef void * pMToken

Functions

void release_gc (sGcCtx *gc)
sGcCtxgenerate_gc (void)
void dump_tok (FILE *fp, pMToken p)
void print_decl (FILE *fp, pMToken p)
char * sprint_decl (pMToken r)
pMToken decode_ms_name (sGcCtx *gc, const char *name)
char * encode_ms_name (sGcCtx *gc, pMToken tok)

Typedef Documentation

typedef void* pGcElem

Garbage collector elements. Tracks allocated memory and points to the next element from the same context.

See also:
sGcCtx
typedef void* pMToken

Generic token instances. Type of token determined by base descriptor in members. Base descriptor header available in all members through type punning.

See also:
gen_tok()

Function Documentation

pMToken decode_ms_name ( sGcCtx gc,
const char *  name 
)

Decodes an MSVC export name.

Parameters:
[in] gc sGcCtx pointer for collecting memory allocations.
[in] name MSVC C++ mangled export string.
See also:
sprint_decl()
release_gc()
pMToken
Returns:
Token containing information about the mangled string, use release_gc() to free after use.
void dump_tok ( FILE *  fp,
pMToken  p 
)

Dumps pMToken to a file descriptor for debugging.

Parameters:
[in] fp File descriptor to print the token to.
[in] p pMToken chain to print.
char* encode_ms_name ( sGcCtx gc,
pMToken  tok 
)
sGcCtx* generate_gc ( void   ) 

Constructs a garbage collection context token.

Returns:
Pointer to context.
See also:
release_gc()
void print_decl ( FILE *  fp,
pMToken  p 
)

Prints C++ name to file descriptor.

Parameters:
[in] fp Output file descriptor.
[in] p Token containing information about the C++ name.
See also:
decode_ms_name()
void release_gc ( sGcCtx gc  ) 

Releases memory tracked by context.

Parameters:
[in] gc Garbage collection context to work on.
See also:
generate_gc()
char* sprint_decl ( pMToken  r  ) 

Get pointer to decoded C++ name string. Use free() to release returned string.

Parameters:
[in] r C++ name token.
Returns:
pointer to decoded C++ name string.
See also:
decode_ms_name()

Generated on 10 Oct 2009 for libmangle by  doxygen 1.6.1