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



Author: johan
Date: Tue Aug 19 21:59:58 2008
New Revision: 405
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=405&view=rev

Log:
2008-08-19  Johan Dahlin  <johan gnome org>

    * giscanner/transformer.py:
    * tests/scanner/Foo-expected.gir:
    * tests/scanner/foo-object.h:
    Add support for typedef void foo type of
    aliases.



Modified:
   trunk/ChangeLog
   trunk/giscanner/transformer.py
   trunk/tests/scanner/Foo-expected.gir
   trunk/tests/scanner/foo-object.h

Modified: trunk/giscanner/transformer.py
==============================================================================
--- trunk/giscanner/transformer.py	(original)
+++ trunk/giscanner/transformer.py	Tue Aug 19 21:59:58 2008
@@ -234,11 +234,12 @@
                        CTYPE_POINTER,
                        CTYPE_BASIC_TYPE,
                        CTYPE_VOID):
+            name = self.strip_namespace_object(symbol.ident)
             if symbol.base_type.name:
-                name = self.strip_namespace_object(symbol.ident)
                 target = self.strip_namespace_object(symbol.base_type.name)
-                return Alias(name, target, ctype=symbol.ident)
-            return None
+            else:
+                target = 'none'
+            return Alias(name, target, ctype=symbol.ident)
         else:
             raise NotImplementedError(
                 "symbol %r of type %s" % (symbol.ident, ctype_name(ctype)))

Modified: trunk/tests/scanner/Foo-expected.gir
==============================================================================
--- trunk/tests/scanner/Foo-expected.gir	(original)
+++ trunk/tests/scanner/Foo-expected.gir	Tue Aug 19 21:59:58 2008
@@ -4,6 +4,7 @@
             xmlns:glib="http://www.gtk.org/introspection/glib/1.0";>
   <namespace name="Foo">
     <alias name="List" target="GSList" c:type="FooList"/>
+    <alias name="XEvent" target="none" c:type="FooXEvent"/>
     <interface name="Interface"
                c:type="FooInterface"
                glib:type-name="FooInterface"

Modified: trunk/tests/scanner/foo-object.h
==============================================================================
--- trunk/tests/scanner/foo-object.h	(original)
+++ trunk/tests/scanner/foo-object.h	Tue Aug 19 21:59:58 2008
@@ -181,4 +181,6 @@
   FooEventExpose expose;
 };
 
+typedef void FooXEvent;
+
 #endif /* __FOO_OBJECT_H__ */



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