forked from enlightenment/efl
* eet: we don't need to duplicate hash key when we could just point
to the Eet_File dictionnary entries. SVN revision: 47806
This commit is contained in:
parent
e8883033a2
commit
7c14ed7617
|
@ -346,3 +346,8 @@
|
|||
|
||||
* Fix eet_data_node_read_cipher return type.
|
||||
* Add Eet_Connection.
|
||||
|
||||
2010-04-07 Cedric BAIL
|
||||
|
||||
* Improve eet_eina_file_data_descriptor_class_set by using
|
||||
eina_hash_direct_add to avoid duplication hash key string.
|
||||
|
|
|
@ -1201,6 +1201,16 @@ _eet_eina_hash_add_alloc(Eina_Hash *hash, const char *key, void *data)
|
|||
return hash;
|
||||
}
|
||||
|
||||
static Eina_Hash *
|
||||
_eet_eina_hash_direct_add_alloc(Eina_Hash *hash, const char *key, void *data)
|
||||
{
|
||||
if (!hash) hash = eina_hash_string_small_new(NULL);
|
||||
if (!hash) return NULL;
|
||||
|
||||
eina_hash_direct_add(hash, key, data);
|
||||
return hash;
|
||||
}
|
||||
|
||||
static char *
|
||||
_eet_str_direct_alloc(const char *str)
|
||||
{
|
||||
|
@ -1257,6 +1267,7 @@ eet_eina_file_data_descriptor_class_set(Eet_Data_Descriptor_Class *eddc, const c
|
|||
|
||||
eddc->version = 2;
|
||||
|
||||
eddc->func.hash_add = (void* (*)(void *, const char *, void *)) _eet_eina_hash_direct_add_alloc;
|
||||
eddc->func.str_direct_alloc = _eet_str_direct_alloc;
|
||||
eddc->func.str_direct_free = _eet_str_direct_free;
|
||||
|
||||
|
|
Loading…
Reference in New Issue