mirror of
https://github.com/asterisk/asterisk.git
synced 2025-12-03 03:31:40 +00:00
Fix naming mismatch of allocator functions.
Allocator functions that take file/line/func parameters are prefixed with single-underscore when MALLOC_DEBUG is not defined, double-underscore when it is defined. This change updates all allocators that accept file/line/func to have the same prototype in either ABI mode. The parameter order of __ast_vasprintf and __ast_asprintf in utils.h have been changed to match that of astmm.h. End-use allocator macro's have been removed from astmm.h and moved to an unconditional part of utils.h. Change-Id: I823bb6ce2b5675b3a4735948f10a3b420e9a023a
This commit is contained in:
@@ -174,35 +174,11 @@ void __ast_mm_init_phase_2(void);
|
||||
|
||||
#endif
|
||||
|
||||
/* Provide our own definitions */
|
||||
|
||||
#define ast_calloc(a,b) \
|
||||
__ast_calloc(a,b,__FILE__, __LINE__, __PRETTY_FUNCTION__)
|
||||
|
||||
#define ast_calloc_cache(a,b) \
|
||||
__ast_calloc_cache(a,b,__FILE__, __LINE__, __PRETTY_FUNCTION__)
|
||||
|
||||
#define ast_malloc(a) \
|
||||
__ast_malloc(a,__FILE__, __LINE__, __PRETTY_FUNCTION__)
|
||||
/* Provide our own definition for ast_free */
|
||||
|
||||
#define ast_free(a) \
|
||||
__ast_free(a,__FILE__, __LINE__, __PRETTY_FUNCTION__)
|
||||
|
||||
#define ast_realloc(a,b) \
|
||||
__ast_realloc(a,b,__FILE__, __LINE__, __PRETTY_FUNCTION__)
|
||||
|
||||
#define ast_strdup(a) \
|
||||
__ast_strdup(a,__FILE__, __LINE__, __PRETTY_FUNCTION__)
|
||||
|
||||
#define ast_strndup(a,b) \
|
||||
__ast_strndup(a,b,__FILE__, __LINE__, __PRETTY_FUNCTION__)
|
||||
|
||||
#define ast_asprintf(a, b, c...) \
|
||||
__ast_asprintf(__FILE__, __LINE__, __PRETTY_FUNCTION__, a, b, c)
|
||||
|
||||
#define ast_vasprintf(a,b,c) \
|
||||
__ast_vasprintf(a,b,c,__FILE__, __LINE__, __PRETTY_FUNCTION__)
|
||||
|
||||
#endif /* !STANDALONE */
|
||||
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user