summaryrefslogtreecommitdiff
path: root/main/astobj2_container_private.h
diff options
context:
space:
mode:
authorCorey Farrell <git@cfware.com>2015-04-17 03:16:59 -0400
committerCorey Farrell <git@cfware.com>2015-04-27 18:37:26 -0400
commit5c1d07baf083fd791c8f717209551d9227413ef7 (patch)
tree7eff8c651efb82e89fd7918038102b84fe888ced /main/astobj2_container_private.h
parentd7f4788341f08f386341416aa3944c7f9bc0dc1b (diff)
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
Diffstat (limited to 'main/astobj2_container_private.h')
-rw-r--r--main/astobj2_container_private.h18
1 files changed, 2 insertions, 16 deletions
diff --git a/main/astobj2_container_private.h b/main/astobj2_container_private.h
index 07779a5f9..3651ca41f 100644
--- a/main/astobj2_container_private.h
+++ b/main/astobj2_container_private.h
@@ -87,26 +87,15 @@ typedef void (*ao2_container_destroy_fn)(struct ao2_container *self);
* \brief Create an empty copy of this container.
*
* \param self Container to operate upon.
- *
- * \retval empty-container on success.
- * \retval NULL on error.
- */
-typedef struct ao2_container *(*ao2_container_alloc_empty_clone_fn)(struct ao2_container *self);
-
-/*!
- * \brief Create an empty copy of this container. (Debug version)
- *
- * \param self Container to operate upon.
* \param tag used for debugging.
* \param file Debug file name invoked from
* \param line Debug line invoked from
* \param func Debug function name invoked from
- * \param ref_debug TRUE if to output a debug reference message.
*
* \retval empty-container on success.
* \retval NULL on error.
*/
-typedef struct ao2_container *(*ao2_container_alloc_empty_clone_debug_fn)(struct ao2_container *self, const char *tag, const char *file, int line, const char *func, int ref_debug);
+typedef struct ao2_container *(*ao2_container_alloc_empty_clone_fn)(struct ao2_container *self, const char *tag, const char *file, int line, const char *func);
/*!
* \brief Create a new container node.
@@ -250,8 +239,6 @@ struct ao2_container_methods {
ao2_container_destroy_fn destroy;
/*! \brief Create an empty copy of this container. */
ao2_container_alloc_empty_clone_fn alloc_empty_clone;
- /*! \brief Create an empty copy of this container. (Debug version) */
- ao2_container_alloc_empty_clone_debug_fn alloc_empty_clone_debug;
/*! Create a new container node. */
ao2_container_new_node_fn new_node;
/*! Insert a node into this container. */
@@ -336,10 +323,9 @@ int __container_unlink_node_debug(struct ao2_container_node *node, uint32_t flag
const char *tag, const char *file, int line, const char *func);
#define __container_unlink_node(node, flags) \
- __container_unlink_node_debug(node, flags, NULL, NULL, 0, NULL)
+ __container_unlink_node_debug(node, flags, NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__)
void container_destruct(void *_c);
-void container_destruct_debug(void *_c);
int container_init(void);
#endif /* ASTOBJ2_CONTAINER_PRIVATE_H_ */