libnm-util: fix deprecated g_value_get_char() for glib 2.29.90 and later

This commit is contained in:
Dan Williams
2011-10-03 10:33:12 -05:00
parent 3e79f06566
commit 6c6ec65abe

View 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;