gobject-introspection r632 - trunk/giscanner



Author: walters
Date: Sun Sep 28 04:05:29 2008
New Revision: 632
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=632&view=rev

Log:
Ensure constructor returns are always most concrete type

This makes things a bit easier for binding writers - the
superclass returns are only a C convenience.


Modified:
   trunk/giscanner/glibtransformer.py

Modified: trunk/giscanner/glibtransformer.py
==============================================================================
--- trunk/giscanner/glibtransformer.py	(original)
+++ trunk/giscanner/glibtransformer.py	Sun Sep 28 04:05:29 2008
@@ -378,6 +378,9 @@
                 return None
             # TODO - check that the return type is a subclass of the
             # class from the prefix
+            # But for now, ensure that constructor returns are always
+            # the most concrete class
+            func.retval.type = Type(klass.name, klass.ctype+'*')
 
         self._remove_attribute(func.name)
         # Strip namespace and object prefix: gtk_window_new -> new



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