* e: Config in E17 could take avantage off Eet mapped string, but right
authorCedric BAIL <cedric.bail@free.fr>
Wed, 7 Apr 2010 13:54:33 +0000 (13:54 +0000)
committerCedric BAIL <cedric.bail@free.fr>
Wed, 7 Apr 2010 13:54:33 +0000 (13:54 +0000)
now the API doesn't provide a way to let the Eet_File open. So don't
hack around Eet API and use the proper API.

TODO: Break E_Config API to hold a reference to the Eet_File as long as
needed.

SVN revision: 47805

src/bin/e_config_data.c

index 2e6010323e5beee417b1ed409d05ba4169a9875f..5cf7aa41c572ce40e756fd8fdec288af8cd9adbc 100644 (file)
@@ -8,14 +8,13 @@ e_config_descriptor_new(const char *name, int size)
 {
    Eet_Data_Descriptor_Class eddc;
 
-   if (!eet_eina_file_data_descriptor_class_set(&eddc, name, size))
+   if (!eet_eina_stream_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;
+   /* FIXME: We can directly map string inside an Eet_File and reuse it.
+      But this need a break in all user of config every where in E.
+   */
 
-   return (E_Config_DD *) eet_data_descriptor_file_new(&eddc);
+   return (E_Config_DD *) eet_data_descriptor_stream_new(&eddc);
 }