summaryrefslogtreecommitdiff
path: root/include/asterisk/hashtab.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asterisk/hashtab.h')
-rw-r--r--include/asterisk/hashtab.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/asterisk/hashtab.h b/include/asterisk/hashtab.h
index aa4dc59db..dbecaa2bc 100644
--- a/include/asterisk/hashtab.h
+++ b/include/asterisk/hashtab.h
@@ -189,12 +189,22 @@ unsigned int ast_hashtab_hash_short(const short num);
* \param hash a func ptr to do the hashing
* \param do_locking use locks to guarantee safety of iterators/insertion/deletion -- real simpleminded right now
*/
+#if (defined(MALLOC_DEBUG) && !defined(STANDALONE))
+struct ast_hashtab * _ast_hashtab_create(int initial_buckets,
+ int (*compare)(const void *a, const void *b),
+ int (*resize)(struct ast_hashtab *),
+ int (*newsize)(struct ast_hashtab *tab),
+ unsigned int (*hash)(const void *obj),
+ int do_locking, const char *file, int lineno, const char *function);
+#define ast_hashtab_create(a,b,c,d,e,f) _ast_hashtab_create(a,b,c,d,e,f,__FILE__,__LINE__,__PRETTY_FUNCTION__)
+#else
struct ast_hashtab * ast_hashtab_create(int initial_buckets,
int (*compare)(const void *a, const void *b),
int (*resize)(struct ast_hashtab *),
int (*newsize)(struct ast_hashtab *tab),
unsigned int (*hash)(const void *obj),
int do_locking );
+#endif
/*!
* \brief This func will free the hash table and all its memory.