astobj2: Eliminate usage of legacy container allocation macros.

These macros have been documented as legacy for a long time but are
still used in new code because they exist.  Remove all references to:
* ao2_container_alloc_options
* ao2_t_container_alloc_options
* ao2_t_container_alloc

These macro's are still available for use but only in modules.  Only
ao2_container_alloc remains due to it's use in over 100 places.

Change-Id: I1a26258b5bf3deb081aaeed11a0baa175c933c7a
This commit is contained in:
Corey Farrell
2018-10-16 15:00:27 -04:00
parent b7cb2c90e6
commit 54a1fbe428
19 changed files with 82 additions and 50 deletions

View File

@@ -353,8 +353,8 @@ static void format_cache_shutdown(void)
int ast_format_cache_init(void)
{
formats = ao2_container_alloc_options(AO2_ALLOC_OPT_LOCK_RWLOCK, CACHE_BUCKETS,
format_hash_cb, format_cmp_cb);
formats = ao2_container_alloc_hash(AO2_ALLOC_OPT_LOCK_RWLOCK, 0, CACHE_BUCKETS,
format_hash_cb, NULL, format_cmp_cb);
if (!formats) {
return -1;
}