IRCBot Plugin API  v5
Public Member Functions | Public Attributes | List of all members
API_memory Struct Reference

#include <plugins.h>

Public Member Functions

void *DSL_CCalloc (uint32 lSize, const char *file, int line)
 
void *DSL_CCrealloc (void *ptr, uint32 lSize, const char *file, int line)
 
char *DSL_CCstrdup (const char *ptr, const char *file, int line)
 
wchar_t *DSL_CCwcsdup (const wchar_t *ptr, const char *file, int line)
 
 void (DSL_CC *free)(void *ptr
 
char *DSL_CCmprintf (const char *ptr,...)
 Like vsprintf, free returned pointer with API_memory::free. More...
 

Public Attributes

const char * file
 
const char int line
 

Detailed Description

These functions let you allocate/free memory in the bot's memory instance. Standard malloc-style semantics apply.
Check out the zmalloc example #defines at the end of plugins.h for an easy way to use these.

Member Function Documentation

void* DSL_CC* API_memory::alloc ( uint32  lSize,
const char *  file,
int  line 
)
void* DSL_CC* API_memory::realloc ( void ptr,
uint32  lSize,
const char *  file,
int  line 
)
char* DSL_CC* API_memory::strdup ( const char *  ptr,
const char *  file,
int  line 
)
wchar_t* DSL_CC* API_memory::wcsdup ( const wchar_t *  ptr,
const char *  file,
int  line 
)
API_memory::void ( DSL_CC free)
char* DSL_CC* API_memory::mprintf ( const char *  ptr,
  ... 
)

Like vsprintf, free returned pointer with API_memory::free.

Member Data Documentation

const char* API_memory::file
const char int API_memory::line

The documentation for this struct was generated from the following file: