[glib: 4/5] gbinding: Use new g_value_set_interned_string() API for performance
- From: Sebastian Dröge <sdroege src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 4/5] gbinding: Use new g_value_set_interned_string() API for performance
- Date: Wed, 20 May 2020 08:26:13 +0000 (UTC)
commit 73d7f35ce7b71b470bfe6db2d9648a8a0baa591b
Author: Edward Hervey <edward centricular com>
Date: Tue May 19 11:14:51 2020 +0200
gbinding: Use new g_value_set_interned_string() API for performance
The property strings are interned already, so this potentially allows for faster
comparisons. The property strings were already not copied, as they were tagged
as static.
gobject/gbinding.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gobject/gbinding.c b/gobject/gbinding.c
index 12475bcdd..015889b24 100644
--- a/gobject/gbinding.c
+++ b/gobject/gbinding.c
@@ -540,7 +540,7 @@ g_binding_get_property (GObject *gobject,
case PROP_SOURCE_PROPERTY:
/* @source_property is interned, so we don’t need to take a copy */
- g_value_set_static_string (value, binding->source_property);
+ g_value_set_interned_string (value, binding->source_property);
break;
case PROP_TARGET:
@@ -549,7 +549,7 @@ g_binding_get_property (GObject *gobject,
case PROP_TARGET_PROPERTY:
/* @target_property is interned, so we don’t need to take a copy */
- g_value_set_static_string (value, binding->target_property);
+ g_value_set_interned_string (value, binding->target_property);
break;
case PROP_FLAGS:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]