Commit 87a16c3d authored by Laurent Bigonville's avatar Laurent Bigonville

[svn-buildpackage] Tagging json-glib 0.13.4-2

parent 238409d4
json-glib (0.13.4-2) UNRELEASED; urgency=low
json-glib (0.13.4-2) unstable; urgency=low
* Rename gir1.2-json-glib-1.0 package to gir1.2-json-1.0 to follow policy
* d/p/0001-Fix-GVariant-creation-on-some-architectures-bug-6504.patch:
Fix FTBFS on some architectures (Closes: #632823)
-- Laurent Bigonville <bigon@debian.org> Tue, 21 Jun 2011 16:51:59 +0200
-- Laurent Bigonville <bigon@debian.org> Wed, 06 Jul 2011 15:46:43 +0200
json-glib (0.13.4-1) unstable; urgency=low
......
From 4537f7cd76e9b929197be2d92652a9e7037827db Mon Sep 17 00:00:00 2001
From: Laurent Bigonville <bigon@bigon.be>
Date: Wed, 6 Jul 2011 12:34:56 +0200
Subject: [PATCH] Fix GVariant creation on some architectures (bug #650483)
Fix casting issue in Gvariant creation on some architectures.
---
json-glib/json-gvariant.c | 46 +++++++++++++++++++++++++++++++++++++++-----
1 files changed, 40 insertions(+), 6 deletions(-)
diff --git a/json-glib/json-gvariant.c b/json-glib/json-gvariant.c
index c239457..cae43e0 100644
--- a/json-glib/json-gvariant.c
+++ b/json-glib/json-gvariant.c
@@ -1126,10 +1126,8 @@ json_to_gvariant_recurse (JsonNode *json_node,
{
GVariant *variant = NULL;
GVariantClass class;
- gchar class_type[2] = {0, 0};
class = json_to_gvariant_get_next_class (json_node, signature);
- class_type[0] = class;
if (class == JSON_G_VARIANT_CLASS_DICTIONARY)
{
@@ -1143,31 +1141,67 @@ json_to_gvariant_recurse (JsonNode *json_node,
{
case G_VARIANT_CLASS_BOOLEAN:
if (json_node_assert_type (json_node, JSON_NODE_VALUE, G_TYPE_BOOLEAN, error))
- variant = g_variant_new (class_type, json_node_get_boolean (json_node));
+ variant = g_variant_new_boolean (json_node_get_boolean (json_node));
break;
case G_VARIANT_CLASS_BYTE:
+ if (json_node_assert_type (json_node, JSON_NODE_VALUE, G_TYPE_INT64, error))
+ variant = g_variant_new_byte (json_node_get_int (json_node));
+ break;
+
case G_VARIANT_CLASS_INT16:
+ if (json_node_assert_type (json_node, JSON_NODE_VALUE, G_TYPE_INT64, error))
+ variant = g_variant_new_int16 (json_node_get_int (json_node));
+ break;
+
case G_VARIANT_CLASS_UINT16:
+ if (json_node_assert_type (json_node, JSON_NODE_VALUE, G_TYPE_INT64, error))
+ variant = g_variant_new_uint16 (json_node_get_int (json_node));
+ break;
+
case G_VARIANT_CLASS_INT32:
+ if (json_node_assert_type (json_node, JSON_NODE_VALUE, G_TYPE_INT64, error))
+ variant = g_variant_new_int32 (json_node_get_int (json_node));
+ break;
+
case G_VARIANT_CLASS_UINT32:
+ if (json_node_assert_type (json_node, JSON_NODE_VALUE, G_TYPE_INT64, error))
+ variant = g_variant_new_uint32 (json_node_get_int (json_node));
+ break;
+
case G_VARIANT_CLASS_INT64:
+ if (json_node_assert_type (json_node, JSON_NODE_VALUE, G_TYPE_INT64, error))
+ variant = g_variant_new_int64 (json_node_get_int (json_node));
+ break;
+
case G_VARIANT_CLASS_UINT64:
+ if (json_node_assert_type (json_node, JSON_NODE_VALUE, G_TYPE_INT64, error))
+ variant = g_variant_new_uint64 (json_node_get_int (json_node));
+ break;
+
case G_VARIANT_CLASS_HANDLE:
if (json_node_assert_type (json_node, JSON_NODE_VALUE, G_TYPE_INT64, error))
- variant = g_variant_new (class_type, json_node_get_int (json_node));
+ variant = g_variant_new_handle (json_node_get_int (json_node));
break;
case G_VARIANT_CLASS_DOUBLE:
if (json_node_assert_type (json_node, JSON_NODE_VALUE, G_TYPE_DOUBLE, error))
- variant = g_variant_new (class_type, json_node_get_double (json_node));
+ variant = g_variant_new_double (json_node_get_double (json_node));
break;
case G_VARIANT_CLASS_STRING:
+ if (json_node_assert_type (json_node, JSON_NODE_VALUE, G_TYPE_STRING, error))
+ variant = g_variant_new_string (json_node_get_string (json_node));
+ break;
+
case G_VARIANT_CLASS_OBJECT_PATH:
+ if (json_node_assert_type (json_node, JSON_NODE_VALUE, G_TYPE_STRING, error))
+ variant = g_variant_new_object_path (json_node_get_string (json_node));
+ break;
+
case G_VARIANT_CLASS_SIGNATURE:
if (json_node_assert_type (json_node, JSON_NODE_VALUE, G_TYPE_STRING, error))
- variant = g_variant_new (class_type, json_node_get_string (json_node));
+ variant = g_variant_new_signature (json_node_get_string (json_node));
break;
case G_VARIANT_CLASS_VARIANT:
--
1.7.4.1
0001-Fix-GVariant-creation-on-some-architectures-bug-6504.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment