gobject-introspection r681 - in trunk: . giscanner tests/scanner



Author: juergbi
Date: Sun Oct 12 15:39:58 2008
New Revision: 681
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=681&view=rev

Log:
2008-10-12  JÃrg Billeter  <j bitron ch>

	* giscanner/glibtransformer.py:
	* tests/scanner/annotation-1.0-expected.gir:
	* tests/scanner/drawable-1.0-expected.gir:
	* tests/scanner/drawable.h:
	* tests/scanner/foo-1.0-expected.gir:
	* tests/scanner/utility-1.0-expected.gir:

	Readd class records as workaround to not break Gtk typelib


Modified:
   trunk/ChangeLog
   trunk/giscanner/glibtransformer.py
   trunk/tests/scanner/annotation-1.0-expected.gir
   trunk/tests/scanner/drawable-1.0-expected.gir
   trunk/tests/scanner/drawable.h
   trunk/tests/scanner/foo-1.0-expected.gir
   trunk/tests/scanner/utility-1.0-expected.gir

Modified: trunk/giscanner/glibtransformer.py
==============================================================================
--- trunk/giscanner/glibtransformer.py	(original)
+++ trunk/giscanner/glibtransformer.py	Sun Oct 12 15:39:58 2008
@@ -468,6 +468,12 @@
                                      (GLibObject, GLibInterface)):
             for field in maybe_class.fields[1:]:
                 pair_class.fields.append(field)
+            return
+        name = self._transformer.strip_namespace_object(maybe_class.name)
+        pair_class = self._get_attribute(name)
+        if pair_class and isinstance(pair_class,
+                                     (GLibObject, GLibInterface)):
+
             del self._names.names[maybe_class.name]
 
     # Introspection

Modified: trunk/tests/scanner/annotation-1.0-expected.gir
==============================================================================
--- trunk/tests/scanner/annotation-1.0-expected.gir	(original)
+++ trunk/tests/scanner/annotation-1.0-expected.gir	Sun Oct 12 15:39:58 2008
@@ -169,5 +169,10 @@
         </return-value>
       </method>
     </class>
+    <record name="ObjectClass" c:type="AnnotationObjectClass">
+      <field name="parent_class">
+        <type name="GObject.Class" c:type="GObjectClass"/>
+      </field>
+    </record>
   </namespace>
 </repository>

Modified: trunk/tests/scanner/drawable-1.0-expected.gir
==============================================================================
--- trunk/tests/scanner/drawable-1.0-expected.gir	(original)
+++ trunk/tests/scanner/drawable-1.0-expected.gir	Sun Oct 12 15:39:58 2008
@@ -23,5 +23,15 @@
         </parameters>
       </method>
     </class>
+    <record name="TestDrawableClass" c:type="TestDrawableClass">
+      <field name="parent_class">
+        <type name="GObject.Class" c:type="GObjectClass"/>
+      </field>
+    </record>
+    <record name="TestPixmapObjectClass" c:type="_TestPixmapObjectClass">
+      <field name="parent_class">
+        <type name="TestDrawableClass" c:type="TestDrawableClass"/>
+      </field>
+    </record>
   </namespace>
 </repository>

Modified: trunk/tests/scanner/drawable.h
==============================================================================
--- trunk/tests/scanner/drawable.h	(original)
+++ trunk/tests/scanner/drawable.h	Sun Oct 12 15:39:58 2008
@@ -20,4 +20,9 @@
 
 void test_drawable_do_foo (TestDrawable *drawable, int x);
 
+struct _TestPixmapObjectClass
+{
+  TestDrawableClass parent_class;
+};
+
 #endif /* __TEST_DRAWABLE_H__ */

Modified: trunk/tests/scanner/foo-1.0-expected.gir
==============================================================================
--- trunk/tests/scanner/foo-1.0-expected.gir	(original)
+++ trunk/tests/scanner/foo-1.0-expected.gir	Sun Oct 12 15:39:58 2008
@@ -25,6 +25,21 @@
         </parameters>
       </callback>
     </interface>
+    <record name="InterfaceIface" c:type="FooInterfaceIface">
+      <field name="parent_iface">
+        <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
+      </field>
+      <callback name="do_foo" c:type="do_foo">
+        <return-value>
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="self">
+            <type name="Interface" c:type="FooInterface*"/>
+          </parameter>
+        </parameters>
+      </callback>
+    </record>
     <class name="Object"
            c:type="FooObject"
            parent="GObject.Object"
@@ -138,6 +153,24 @@
         </parameters>
       </glib:signal>
     </class>
+    <record name="ObjectClass" c:type="FooObjectClass">
+      <field name="parent_class">
+        <type name="GObject.Class" c:type="GObjectClass"/>
+      </field>
+      <callback name="virtual_method" c:type="virtual_method">
+        <return-value>
+          <type name="boolean" c:type="gboolean"/>
+        </return-value>
+        <parameters>
+          <parameter name="object">
+            <type name="Object" c:type="FooObject*"/>
+          </parameter>
+          <parameter name="first_param">
+            <type name="int" c:type="int"/>
+          </parameter>
+        </parameters>
+      </callback>
+    </record>
     <class name="Subobject"
            c:type="FooSubobject"
            parent="Object"
@@ -150,6 +183,11 @@
         </return-value>
       </constructor>
     </class>
+    <record name="SubobjectClass" c:type="FooSubobjectClass">
+      <field name="parent_class">
+        <type name="ObjectClass" c:type="FooObjectClass"/>
+      </field>
+    </record>
     <function name="init" c:identifier="foo_init">
       <return-value>
         <type name="int" c:type="gint"/>

Modified: trunk/tests/scanner/utility-1.0-expected.gir
==============================================================================
--- trunk/tests/scanner/utility-1.0-expected.gir	(original)
+++ trunk/tests/scanner/utility-1.0-expected.gir	Sun Oct 12 15:39:58 2008
@@ -12,6 +12,11 @@
            glib:type-name="UtilityObject"
            glib:get-type="utility_object_get_type">
     </class>
+    <record name="ObjectClass" c:type="UtilityObjectClass">
+      <field name="parent_class">
+        <type name="GObject.Class" c:type="GObjectClass"/>
+      </field>
+    </record>
     <enumeration name="EnumType" c:type="UtilityEnumType">
       <member name="a" value="0" c:identifier="UTILITY_ENUM_A"/>
       <member name="b" value="1" c:identifier="UTILITY_ENUM_B"/>



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