summaryrefslogtreecommitdiff
path: root/include/asterisk/heap.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asterisk/heap.h')
-rw-r--r--include/asterisk/heap.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/include/asterisk/heap.h b/include/asterisk/heap.h
index 728327936..83c69a8d6 100644
--- a/include/asterisk/heap.h
+++ b/include/asterisk/heap.h
@@ -97,14 +97,10 @@ typedef int (*ast_heap_cmp_fn)(void *elm1, void *elm2);
* \return An instance of a max heap
* \since 1.6.1
*/
-#ifdef __AST_DEBUG_MALLOC
struct ast_heap *_ast_heap_create(unsigned int init_height, ast_heap_cmp_fn cmp_fn,
ssize_t index_offset, const char *file, int lineno, const char *func);
-#define ast_heap_create(a,b,c) _ast_heap_create(a,b,c,__FILE__,__LINE__,__PRETTY_FUNCTION__)
-#else
-struct ast_heap *ast_heap_create(unsigned int init_height, ast_heap_cmp_fn cmp_fn,
- ssize_t index_offset);
-#endif
+#define ast_heap_create(init_height, cmp_fn, index_offset) \
+ _ast_heap_create(init_height, cmp_fn, index_offset, __FILE__, __LINE__, __PRETTY_FUNCTION__)
/*!
* \brief Destroy a max heap
@@ -126,12 +122,9 @@ struct ast_heap *ast_heap_destroy(struct ast_heap *h);
* \retval non-zero failure
* \since 1.6.1
*/
-#ifdef __AST_DEBUG_MALLOC
int _ast_heap_push(struct ast_heap *h, void *elm, const char *file, int lineno, const char *func);
-#define ast_heap_push(a,b) _ast_heap_push(a,b,__FILE__,__LINE__,__PRETTY_FUNCTION__)
-#else
-int ast_heap_push(struct ast_heap *h, void *elm);
-#endif
+#define ast_heap_push(h, elm) \
+ _ast_heap_push(h, elm, __FILE__, __LINE__, __PRETTY_FUNCTION__)
/*!
* \brief Pop the max element off of the heap