diff options
author | George Joseph <george.joseph@fairview5.com> | 2014-06-20 15:27:43 +0000 |
---|---|---|
committer | George Joseph <george.joseph@fairview5.com> | 2014-06-20 15:27:43 +0000 |
commit | 577632dec957bfec258918a381133a3c41411b37 (patch) | |
tree | 4eec13395db7c190e79cbedf3669b80fff4f98ea /main/astobj2_private.h | |
parent | d87f8c429e6852d11f7a3bddf6981e2f754c1ea8 (diff) |
astobj2: Additional refactoring to push impl specific code down into the impls.
Move some implementation specific code from astobj2_container.c into
astobj2_hash.c and astobj2_rbtree.c. This completely removes the need for
astobj2_container to switch on RTTI and it no longer has any knowledge of
the implementation details.
Also adds AO2_DEBUG as a new compile option in menuselect which controls
astobj2 debugging independently of AST_DEVMODE and REF_DEBUG.
Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3593/
........
Merged revisions 416806 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@416807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/astobj2_private.h')
-rw-r--r-- | main/astobj2_private.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/main/astobj2_private.h b/main/astobj2_private.h index 79cb06cf6..0583faf7f 100644 --- a/main/astobj2_private.h +++ b/main/astobj2_private.h @@ -26,16 +26,11 @@ #include "asterisk/astobj2.h" -#if defined(TEST_FRAMEWORK) -/* We are building with the test framework enabled so enable AO2 debug tests as well. */ -#define AO2_DEBUG 1 -#endif /* defined(TEST_FRAMEWORK) */ - -#if defined(AST_DEVMODE) +#if defined(AO2_DEBUG) #define AO2_DEVMODE_STAT(stat) stat #else #define AO2_DEVMODE_STAT(stat) -#endif /* defined(AST_DEVMODE) */ +#endif /* defined(AO2_DEBUG) */ #ifdef AO2_DEBUG struct ao2_stats { @@ -46,7 +41,7 @@ struct ao2_stats { volatile int total_locked; }; extern struct ao2_stats ao2; -#endif +#endif /* defined(AO2_DEBUG) */ int is_ao2_object(void *user_data); enum ao2_lock_req __adjust_lock(void *user_data, enum ao2_lock_req lock_how, int keep_stronger); |