mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 21:22:09 +00:00
[Core] Add new switch_core_hash_insert_pointer(switch_hash_t *hash, const void *data) API to be able to insert data into a hash with an auto-generated key based on the data pointer. Cleanup switch_loadable_module_process() to not generate hash keys for stored events itself. Add unit-test.
This commit is contained in:
@@ -1428,6 +1428,14 @@ SWITCH_DECLARE(switch_status_t) switch_core_hash_init_case(_Out_ switch_hash_t *
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_hash_destroy(_Inout_ switch_hash_t **hash);
|
||||
|
||||
/*!
|
||||
\brief Insert data into a hash with an auto-generated key based on the data pointer
|
||||
\param hash the hash to add data to
|
||||
\param data unique pointer to add
|
||||
\return SWITCH_STATUS_SUCCESS if the data is added
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_hash_insert_pointer(switch_hash_t *hash, const void *data);
|
||||
|
||||
/*!
|
||||
\brief Insert data into a hash and set flags so the value is automatically freed on delete
|
||||
\param hash the hash to add data to
|
||||
|
||||
Reference in New Issue
Block a user