aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/e_config_data.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/e_config_data.c')
-rw-r--r--src/bin/e_config_data.c28
1 files changed, 10 insertions, 18 deletions
diff --git a/src/bin/e_config_data.c b/src/bin/e_config_data.c
index d15699b7f..2e6010323 100644
--- a/src/bin/e_config_data.c
+++ b/src/bin/e_config_data.c
@@ -7,23 +7,15 @@ EAPI E_Config_DD *
e_config_descriptor_new(const char *name, int size)
{
Eet_Data_Descriptor_Class eddc;
-
- eddc.version = EET_DATA_DESCRIPTOR_CLASS_VERSION;
- eddc.func.mem_alloc = NULL;
- eddc.func.mem_free = NULL;
- eddc.func.str_alloc = (char *(*)(const char *)) eina_stringshare_add;
- eddc.func.str_free = (void (*)(const char *)) eina_stringshare_del;
- eddc.func.list_next = (void *(*)(void *)) eina_list_next;
- eddc.func.list_append = (void *(*)(void *l, void *d)) eina_list_append;
- eddc.func.list_data = (void *(*)(void *)) eina_list_data_get;
- eddc.func.list_free = (void *(*)(void *)) eina_list_free;
- eddc.func.hash_foreach =
- (void (*) (const Eina_Hash *, Eina_Bool (*) (const Eina_Hash *, const void *, void *, void *), const void *))
- eina_hash_foreach;
- eddc.func.hash_add = (Eina_Hash* (*) (Eina_Hash *, const void *, void *)) eet_eina_hash_add_alloc;
- eddc.func.hash_free = (void (*) (Eina_Hash *)) eina_hash_free;
- eddc.name = name;
- eddc.size = size;
- return (E_Config_DD *)eet_data_descriptor2_new(&eddc);
+
+ if (!eet_eina_file_data_descriptor_class_set(&eddc, name, size))
+ return NULL;
+
+ /* FIXME: We can directly map string inside an Eet_File as we
+ need to change every config destructor in E for that. */
+ eddc.func.str_direct_alloc = NULL;
+ eddc.func.str_direct_free = NULL;
+
+ return (E_Config_DD *) eet_data_descriptor_file_new(&eddc);
}