astobj2: Add tag variants for ao2_bump, ao2_cleanup, and ao2_replace

Tags are useful in hunting down ref imbalances; this patch adds tag variants
for these commonly used macros/functions.

Review: https://reviewboard.asterisk.org/r/3750/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Matthew Jordan
2014-07-11 23:00:21 +00:00
parent 694b68e544
commit 0d1288e2d2
2 changed files with 15 additions and 9 deletions

View File

@@ -524,10 +524,10 @@ int __ao2_ref(void *user_data, int delta)
return internal_ao2_ref(user_data, delta, __FILE__, __LINE__, __FUNCTION__);
}
void __ao2_cleanup_debug(void *obj, const char *file, int line, const char *function)
void __ao2_cleanup_debug(void *obj, const char *tag, const char *file, int line, const char *function)
{
if (obj) {
__ao2_ref_debug(obj, -1, "ao2_cleanup", file, line, function);
__ao2_ref_debug(obj, -1, tag, file, line, function);
}
}