=?utf-8?b?W2pzb24tZ2xpYl0gVXNlIGdfdmFsdWVfW3NnXWV0X3NjaGFyKCkgd2l0aCBH?= =?utf-8?b?TGliIOKJpSAyLjMx?=



commit 4ab8059df6ad106bf8958642aa1126925d79128c
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Wed Oct 12 12:31:27 2011 +0100

    Use g_value_[sg]et_schar() with GLib â 2.31
    
    The non-explicitly signed variant is deprecated.

 json-glib/json-gobject.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/json-glib/json-gobject.c b/json-glib/json-gobject.c
index d3b500b..5ac93c8 100644
--- a/json-glib/json-gobject.c
+++ b/json-glib/json-gobject.c
@@ -532,7 +532,11 @@ json_deserialize_pspec (GValue     *value,
         case G_TYPE_CHAR:
 	  if (G_VALUE_HOLDS (&node_value, G_TYPE_INT64))
 	    {
-	      g_value_set_char (value, (gchar) g_value_get_int64 (&node_value));
+#if GLIB_CHECK_VERSION (2, 31, 0)
+	      g_value_set_schar (value, (gchar) g_value_get_int64 (&node_value));
+#else
+              g_value_set_char (value, (gchar) g_value_get_int64 (&node_value));
+#endif
 	      retval = TRUE;
 	    }
           break;
@@ -744,7 +748,11 @@ json_serialize_pspec (const GValue *real_value,
 
     case G_TYPE_CHAR:
       retval = json_node_new (JSON_NODE_VALUE);
+#if GLIB_CHECK_VERSION (2, 31, 0)
+      json_node_set_int (retval, g_value_get_schar (real_value));
+#else
       json_node_set_int (retval, g_value_get_char (real_value));
+#endif
       break;
 
     case G_TYPE_UCHAR:



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