libnm-util: fix deprecated g_value_get_char() for glib 2.29.90 and later
authorDan Williams <dcbw@redhat.com>
Mon, 3 Oct 2011 15:33:12 +0000 (10:33 -0500)
committerDan Williams <dcbw@redhat.com>
Mon, 3 Oct 2011 15:33:49 +0000 (10:33 -0500)
libnm-util/nm-param-spec-specialized.c

index 7e921bc..f0ca1d9 100644 (file)
@@ -92,8 +92,13 @@ _gvalues_compare_fixed (const GValue *value1, const GValue *value2)
 
        switch (G_VALUE_TYPE (value1)) {
        case G_TYPE_CHAR: {
+#if GLIB_CHECK_VERSION(2,29,90)
+               gchar val1 = g_value_get_schar (value1);
+               gchar val2 = g_value_get_schar (value2);
+#else
                gchar val1 = g_value_get_char (value1);
                gchar val2 = g_value_get_char (value2);
+#endif
                if (val1 != val2)
                        ret = val1 < val2 ? -1 : val1 > val2;
                break;