mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-21 09:10:36 +00:00
Astobj2: Allow reference debugging to be enabled/disabled by config.
* The REF_DEBUG compiler flag no longer has any effect on code that uses Astobj2. It is used to determine if reference debugging is enabled by default. Reference debugging can be enabled or disabled in asterisk.conf. * Caller information is provided in logger errors for ao2 bad magic numbers. * Optimizes AO2 by merging internal functions with the public counterpart. This was possible now that we no longer require a dual ABI. ASTERISK-24974 #close Reported by: Corey Farrell Change-Id: Icf3552721fe999365ba8a8cf00a965aa6b897cc1
This commit is contained in:
@@ -252,20 +252,13 @@ int ast_format_cache_set(struct ast_format *format);
|
||||
* \note The returned format has its reference count incremented. It must be
|
||||
* dropped using ao2_ref or ao2_cleanup.
|
||||
*/
|
||||
struct ast_format *__ast_format_cache_get(const char *name);
|
||||
struct ast_format *__ast_format_cache_get_debug(const char *name, const char *tag, const char *file, int line, const char *func);
|
||||
struct ast_format *__ast_format_cache_get(const char *name,
|
||||
const char *tag, const char *file, int line, const char *func);
|
||||
|
||||
#ifdef REF_DEBUG
|
||||
#define ast_format_cache_get(name) \
|
||||
__ast_format_cache_get_debug((name), "", __FILE__, __LINE__, __PRETTY_FUNCTION__)
|
||||
__ast_format_cache_get((name), "ast_format_cache_get", __FILE__, __LINE__, __PRETTY_FUNCTION__)
|
||||
#define ast_t_format_cache_get(name, tag) \
|
||||
__ast_format_cache_get_debug((name), (tag), __FILE__, __LINE__, __PRETTY_FUNCTION__)
|
||||
#else
|
||||
#define ast_format_cache_get(name) \
|
||||
__ast_format_cache_get((name))
|
||||
#define ast_t_format_cache_get(name, tag) \
|
||||
__ast_format_cache_get((name))
|
||||
#endif
|
||||
__ast_format_cache_get((name), (tag), __FILE__, __LINE__, __PRETTY_FUNCTION__)
|
||||
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user