forked from enlightenment/efl
ecore_hash_goto_first and ecore_hash_next have been removed
SVN revision: 12771
This commit is contained in:
parent
260ad16e93
commit
b9a15e79bd
|
@ -296,8 +296,6 @@ extern "C" {
|
|||
int ecore_hash_set_free_value(Ecore_Hash *hash, Ecore_Free_Cb function);
|
||||
void ecore_hash_destroy(Ecore_Hash *hash);
|
||||
|
||||
Ecore_Hash_Node *ecore_hash_goto_first(Ecore_Hash *hash);
|
||||
Ecore_Hash_Node *ecore_hash_next(Ecore_Hash *hash);
|
||||
int ecore_hash_for_each_node(Ecore_Hash *hash, Ecore_For_Each for_each_func,
|
||||
void *user_data);
|
||||
Ecore_List *ecore_hash_keys(Ecore_Hash *hash);
|
||||
|
|
|
@ -198,70 +198,6 @@ void ecore_hash_destroy(Ecore_Hash *hash)
|
|||
* Functions that iterate through hash tables.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Move the current index to the beginning of the given hash for sequential
|
||||
* processing
|
||||
* @param hash The given hash
|
||||
* @return the topmost node on success, NULL otherwise
|
||||
* @ingroup Ecore_Data_Hash_ADT_Traverse_Group
|
||||
*/
|
||||
Ecore_Hash_Node *ecore_hash_goto_first(Ecore_Hash *hash)
|
||||
{
|
||||
Ecore_Hash_Node *node = NULL;
|
||||
|
||||
CHECK_PARAM_POINTER_RETURN("hash", hash, FALSE);
|
||||
|
||||
hash->index = 0;
|
||||
|
||||
ECORE_READ_LOCK(hash);
|
||||
|
||||
while( hash->index < ecore_prime_table[hash->index] &&
|
||||
!hash->buckets[hash->index] )
|
||||
hash->index++;
|
||||
|
||||
if( hash->index < ecore_prime_table[hash->index] )
|
||||
node = ecore_list_goto_first( hash->buckets[hash->index] );
|
||||
|
||||
ECORE_READ_UNLOCK(hash);
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the current node and move to the next node of the given hash
|
||||
* @param hash The given hash
|
||||
* @return the current node on success, NULL if end reached
|
||||
* @ingroup Ecore_Data_Hash_ADT_Traverse_Group
|
||||
*/
|
||||
Ecore_Hash_Node *ecore_hash_next(Ecore_Hash *hash)
|
||||
{
|
||||
Ecore_Hash_Node *node = NULL;
|
||||
|
||||
CHECK_PARAM_POINTER_RETURN("hash", hash, FALSE);
|
||||
|
||||
ECORE_READ_LOCK(hash);
|
||||
|
||||
while( hash->index < ecore_prime_table[hash->size] &&
|
||||
!hash->buckets[hash->index] ) {
|
||||
hash->index++;
|
||||
if( hash->index < ecore_prime_table[hash->size] &&
|
||||
hash->buckets[hash->index] )
|
||||
ecore_list_goto_first( hash->buckets[hash->index] );
|
||||
}
|
||||
|
||||
if( hash->index < ecore_prime_table[hash->size] ) {
|
||||
node = ecore_list_next( hash->buckets[hash->index] );
|
||||
if( !node ) {
|
||||
hash->index++;
|
||||
node = ecore_hash_next(hash);
|
||||
}
|
||||
}
|
||||
|
||||
ECORE_READ_UNLOCK(hash);
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs the @p for_each_func function on each entry in the given hash.
|
||||
* @param hash The given hash.
|
||||
|
|
Loading…
Reference in New Issue