From: Colin Walters Date: Sun, 28 Sep 2008 04:05:29 +0000 (+0000) Subject: Ensure constructor returns are always most concrete type X-Git-Tag: GOBJECT_INTROSPECTION_0_6_0~216 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=195b04e2c35d8bb3075ee846c77ae89bd3b8ab26;p=platform%2Fupstream%2Fgobject-introspection.git 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. svn path=/trunk/; revision=632 --- diff --git a/giscanner/glibtransformer.py b/giscanner/glibtransformer.py index f007e33d..40608f87 100644 --- a/giscanner/glibtransformer.py +++ b/giscanner/glibtransformer.py @@ -378,6 +378,9 @@ class GLibTransformer(object): 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