IRCBot Plugin API
v5
|
#include <plugins.h>
Public Member Functions | |
void *DSL_CC * | alloc (uint32 lSize, const char *file, int line) |
void *DSL_CC * | realloc (void *ptr, uint32 lSize, const char *file, int line) |
char *DSL_CC * | strdup (const char *ptr, const char *file, int line) |
wchar_t *DSL_CC * | wcsdup (const wchar_t *ptr, const char *file, int line) |
void (DSL_CC *free)(void *ptr | |
char *DSL_CC * | mprintf (const char *ptr,...) |
Like vsprintf, free returned pointer with API_memory::free. More... | |
Public Attributes | |
const char * | file |
const char int | line |
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.
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.
const char* API_memory::file |
const char int API_memory::line |