30 #include "asterisk/_private.h"
36 const char *file,
int line,
const char *
function)
45 #if defined(__AST_DEBUG_MALLOC)
46 if (!(datastore =
__ast_calloc(1,
sizeof(*datastore), file, line,
function))) {
50 if (!(datastore =
ast_calloc(1,
sizeof(*datastore)))) {
72 datastore->
data = NULL;
76 if (datastore->
uid != NULL) {
78 datastore->
uid = NULL;
96 #undef ast_datastore_alloc
void(* destroy)(void *data)
Asterisk main include file. File version handling, generic pbx functions.
struct ast_datastore *attribute_malloc __ast_datastore_alloc(const struct ast_datastore_info *info, const char *uid, const char *file, int line, const char *function)
Create a data store object.
struct ast_datastore_info * info
Structure for a data store type.
void * __ast_calloc(size_t nmemb, size_t size, const char *file, int lineno, const char *func)
Structure for a data store object.
int ast_datastore_free(struct ast_datastore *datastore)
Free a data store object.
Asterisk datastore objects.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
struct ast_datastore * ast_datastore_alloc(const struct ast_datastore_info *info, const char *uid)
#define ASTERISK_FILE_VERSION(file, version)
Register/unregister a source code file with the core.