From: cedric Date: Wed, 15 Oct 2008 15:00:38 +0000 (+0000) Subject: Switch from ecore_strings to eina_stringshare. X-Git-Tag: 2.0_alpha~43^2~456 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b6e93c3508d2f98844809f9e2abae82010dcca1e;p=framework%2Fuifw%2Fedbus.git Switch from ecore_strings to eina_stringshare. This could change E17 stringshare behaviour. Would be a good idea, to do a session dump, benchmark and profile again. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/e_dbus@36678 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/bin/hal.c b/src/bin/hal.c index 215951c..238e423 100644 --- a/src/bin/hal.c +++ b/src/bin/hal.c @@ -776,7 +776,7 @@ main(int argc, char **argv) #endif ecore_init(); - ecore_string_init(); + eina_stringshare_init(); e_dbus_init(); #if EWL_GUI @@ -824,7 +824,7 @@ main(int argc, char **argv) ecore_list_destroy(volumes); e_dbus_connection_close(conn); e_dbus_shutdown(); - ecore_string_shutdown(); + eina_stringshare_shutdown(); ecore_shutdown(); return 1; } diff --git a/src/bin/nm.c b/src/bin/nm.c index a917ab8..5fd488b 100644 --- a/src/bin/nm.c +++ b/src/bin/nm.c @@ -265,7 +265,7 @@ main(int argc, char **argv) { NM_Manager *app; ecore_init(); - ecore_string_init(); + eina_stringshare_init(); e_dbus_init(); app = calloc(1, sizeof(NM_Manager)); @@ -284,7 +284,7 @@ main(int argc, char **argv) e_nm_free(app->ctx); free(app); e_dbus_shutdown(); - ecore_string_shutdown(); + eina_stringshare_shutdown(); ecore_shutdown(); return 0; } diff --git a/src/lib/dbus/e_dbus.c b/src/lib/dbus/e_dbus.c index e83c6ad..4d9b579 100644 --- a/src/lib/dbus/e_dbus.c +++ b/src/lib/dbus/e_dbus.c @@ -586,8 +586,8 @@ e_dbus_init(void) { if (++init != 1) return init; + eina_init(); E_DBUS_EVENT_SIGNAL = ecore_event_type_new(); - ecore_string_init(); e_dbus_object_init(); return init; } @@ -600,6 +600,6 @@ e_dbus_shutdown(void) { if (--init) return init; e_dbus_object_shutdown(); - ecore_string_shutdown(); + eina_shutdown(); return init; } diff --git a/src/lib/hal/E_Hal.h b/src/lib/hal/E_Hal.h index 6feb79a..62d5e3b 100644 --- a/src/lib/hal/E_Hal.h +++ b/src/lib/hal/E_Hal.h @@ -2,6 +2,7 @@ #define E_HAL_H #include #include +#include #ifdef EAPI #undef EAPI diff --git a/src/lib/hal/e_hal_device.c b/src/lib/hal/e_hal_device.c index 68a9dc1..54cf4d9 100644 --- a/src/lib/hal/e_hal_device.c +++ b/src/lib/hal/e_hal_device.c @@ -89,7 +89,7 @@ unmarshal_device_get_all_properties(DBusMessage *msg, DBusError *err) } ret->properties = ecore_hash_new(ecore_str_hash, ecore_str_compare); - ecore_hash_free_key_cb_set(ret->properties, ECORE_FREE_CB(ecore_string_release)); + ecore_hash_free_key_cb_set(ret->properties, ECORE_FREE_CB(eina_stringshare_del)); ecore_hash_free_value_cb_set(ret->properties, ECORE_FREE_CB(e_hal_property_free)); @@ -145,7 +145,7 @@ unmarshal_device_get_all_properties(DBusMessage *msg, DBusError *err) printf("Error: unexpected property type (%s): %c\n", name, dbus_message_iter_get_arg_type(&v_iter)); break; } - ecore_hash_set(ret->properties, (void *)ecore_string_instance(name), prop); + ecore_hash_set(ret->properties, (void *)eina_stringshare_add(name), prop); dbus_message_iter_next(&a_iter); } diff --git a/src/lib/notification/marshal.c b/src/lib/notification/marshal.c index a14ef99..9a0a8e2 100644 --- a/src/lib/notification/marshal.c +++ b/src/lib/notification/marshal.c @@ -102,14 +102,14 @@ e_notify_unmarshal_string_array_as_list(DBusMessageIter *iter, DBusError *err) if (!ret) return NULL; strings = ecore_list_new(); - ecore_list_free_cb_set(strings, ECORE_FREE_CB(free)); //XXX use ecore_string_release? + ecore_list_free_cb_set(strings, ECORE_FREE_CB(free)); //XXX use eina_stringshare_release? dbus_message_iter_recurse(iter, &arr); while(dbus_message_iter_has_next(&arr)) { const char *str; dbus_message_iter_get_basic(&arr, &str); - ecore_list_append(strings, strdup(str)); //XXX use ecore_string_instance? + ecore_list_append(strings, strdup(str)); //XXX use eina_stringshare_instance? dbus_message_iter_next(&arr); } return strings;