forked from enlightenment/efl
parent
4d13de35e9
commit
7decbe6825
|
@ -102,7 +102,12 @@
|
||||||
|
|
||||||
* Fix eina_hash_set to handle data == NULL like eina_hash_del.
|
* Fix eina_hash_set to handle data == NULL like eina_hash_del.
|
||||||
|
|
||||||
2011-06-3 Vincent Torri
|
2011-06-03 Vincent Torri
|
||||||
|
|
||||||
* Fix static linking with eina (iconv could potentially not be
|
* Fix static linking with eina (iconv could potentially not be
|
||||||
passed to the linker)
|
passed to the linker)
|
||||||
|
|
||||||
|
2011-06-15 Cedric Bail
|
||||||
|
|
||||||
|
* Add eina_hash_free_set to change the free callback during the
|
||||||
|
life of an Eina_Hash.
|
||||||
|
|
|
@ -263,6 +263,15 @@ EAPI Eina_Hash *eina_hash_new(Eina_Key_Length key_length_cb,
|
||||||
Eina_Free_Cb data_free_cb,
|
Eina_Free_Cb data_free_cb,
|
||||||
int buckets_power_size) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(2, 3);
|
int buckets_power_size) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(2, 3);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Redefine the callback that clean the data of a hash
|
||||||
|
*
|
||||||
|
* @param hash The given hash table
|
||||||
|
* @param data_free_cb The function called on each value when the hash
|
||||||
|
* table is freed. @c NULL can be passed as callback.
|
||||||
|
*/
|
||||||
|
EAPI void eina_hash_free_set(Eina_Hash *hash, Eina_Free_Cb data_free_cb) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Create a new hash table using the djb2 algorithm.
|
* @brief Create a new hash table using the djb2 algorithm.
|
||||||
*
|
*
|
||||||
|
|
|
@ -713,6 +713,15 @@ _eina_hash_iterator_free(Eina_Iterator_Hash *it)
|
||||||
* API *
|
* API *
|
||||||
*============================================================================*/
|
*============================================================================*/
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
eina_hash_free_set(Eina_Hash *hash, Eina_Free_Cb data_free_cb)
|
||||||
|
{
|
||||||
|
EINA_MAGIC_CHECK_HASH(hash);
|
||||||
|
EINA_SAFETY_ON_NULL_RETURN(hash);
|
||||||
|
|
||||||
|
hash->data_free_cb = data_free_cb;
|
||||||
|
}
|
||||||
|
|
||||||
EAPI Eina_Hash *
|
EAPI Eina_Hash *
|
||||||
eina_hash_new(Eina_Key_Length key_length_cb,
|
eina_hash_new(Eina_Key_Length key_length_cb,
|
||||||
Eina_Key_Cmp key_cmp_cb,
|
Eina_Key_Cmp key_cmp_cb,
|
||||||
|
|
Loading…
Reference in New Issue