[glib/glib-2-56] Fix the cmp implementation for variant values



commit 623f92ed2df41265c11c3ca1e03176033045d4de
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue May 1 22:45:31 2018 -0400

    Fix the cmp implementation for variant values
    
    This was causing g_param_value_defaults to return 1
    for GVariant values even when the value is clearly
    different from the default.
    
    This was showing up as gtk-builder-tool stripping
    non-default values for GtkActionable::action-target
    from ui files.

 gobject/gparamspecs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gobject/gparamspecs.c b/gobject/gparamspecs.c
index 8c285fa1c..9c1259241 100644
--- a/gobject/gparamspecs.c
+++ b/gobject/gparamspecs.c
@@ -1155,7 +1155,7 @@ param_variant_values_cmp (GParamSpec   *pspec,
   GVariant *v1 = value1->data[0].v_pointer;
   GVariant *v2 = value2->data[0].v_pointer;
 
-  return v1 < v2 ? -1 : v2 > v1;
+  return v1 < v2 ? -1 : v1 > v2;
 }
 
 /* --- type initialization --- */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]