[glib/fix-gnulib-msvc-isnan: 21/37] gbinding: Use new g_value_set_interned_string() API for performance



commit a8ac29299be5619ac9d4cc9b3f690e1e41ef1179
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]