Respect is_pointer in serialize_type()
authorOwen Taylor <otaylor@src.gnome.org>
Sun, 16 Nov 2008 21:20:26 +0000 (21:20 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Sun, 16 Nov 2008 21:20:26 +0000 (21:20 +0000)
Add a '*' to the serialization for the cases where we set is_pointer
in the type blob we write out depending on node->is_pointer. Don't
add the '*' in the cases where is_pointer is set or not set in a
fixed fashion.

http://bugzilla.gnome.org/show_bug.cgi?id=561087

svn path=/trunk/; revision=931

ChangeLog
girepository/girnode.c

index 7bb958f..7165fc9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2008-11-16  Owen Taylor  <otaylor@redhat.com>
+
+       Bug 561087 - Respect is_pointer in serialize_type()
+
+       Add a '*' to the serialization for the cases where we set is_pointer
+       in the type blob we write out depending on node->is_pointer. Don't
+       add the '*' in the cases where is_pointer is set or not set in a
+       fixed fashion.
+
+       http://bugzilla.gnome.org/show_bug.cgi?id=561087
+
 2008-11-16  Owen Taylor  <otaylor@redhat.com>
 
        Bug 560825 – Add size and alignment to typelib
index 9f809d4..9c5cf5b 100644 (file)
@@ -1191,7 +1191,8 @@ serialize_type (GIrModule    *module,
   
   if (node->tag < GI_TYPE_TAG_ARRAY)
     {
-      g_string_append_printf (str, "%s", basic[node->tag]);
+      g_string_append_printf (str, "%s%s", basic[node->tag],
+                             node->is_pointer ? "*" : "");
     }
   else if (node->tag == GI_TYPE_TAG_ARRAY)
     {
@@ -1227,7 +1228,8 @@ serialize_type (GIrModule    *module,
          name = node->interface;
        }
 
-      g_string_append_printf (str, "%s", name);
+      g_string_append_printf (str, "%s%s", name,
+                             node->is_pointer ? "*" : "");
     }
   else if (node->tag == GI_TYPE_TAG_GLIST)
     {