mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 00:10:07 +01:00
libnm-util: fix deprecated g_value_get_char() for glib 2.29.90 and later
This commit is contained in:
parent
3e79f06566
commit
6c6ec65abe
1 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue