Write property.type as a child node.
authorJohan Dahlin <johan@gnome.org>
Mon, 28 Apr 2008 11:52:53 +0000 (11:52 +0000)
committerJohan Dahlin <johan@src.gnome.org>
Mon, 28 Apr 2008 11:52:53 +0000 (11:52 +0000)
2008-04-28  Johan Dahlin  <johan@gnome.org>

        * giscanner/girwriter.py:
        * tests/parser/Foo-expected.gir:
        Write property.type as a child node.

svn path=/trunk/; revision=246

ChangeLog
giscanner/girwriter.py
tests/parser/Foo-expected.gir

index 057a34d..b178556 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-04-28  Johan Dahlin  <johan@gnome.org>
+
+       * giscanner/girwriter.py:
+       * tests/parser/Foo-expected.gir:
+       Write property.type as a child node.
+
 2008-04-27  Johan Dahlin  <johan@gnome.org>
 
        * Makefile.am:
index 4c0df8f..166da8e 100644 (file)
@@ -159,9 +159,9 @@ class GIRWriter(XMLWriter):
                 self._write_method(method)
 
     def _write_property(self, prop):
-        attrs = [('name', prop.name),
-                 ('prop', prop.type.name)]
-        self.write_tag('property', attrs)
+        attrs = [('name', prop.name)]
+        with self.tagcontext('property', attrs):
+            self._write_type(prop.type)
 
     def _write_callback(self, callback):
         attrs = [('name', callback.name)]
index 4996e05..aa6e4d8 100644 (file)
           </parameter>
         </parameters>
       </method>
-      <property name="string" prop="gchararray"/>
+      <property name="string">
+        <type name="gchararray"/>
+      </property>
     </class>
     <class name="Subobject"
            parent="Object"