projects
/
platform
/
upstream
/
gobject-introspection.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a9f0931
)
Ensure constructor returns are always most concrete type
author
Colin Walters
<walters@src.gnome.org>
Sun, 28 Sep 2008 04:05:29 +0000
(
04:05
+0000)
committer
Colin Walters
<walters@src.gnome.org>
Sun, 28 Sep 2008 04:05:29 +0000
(
04:05
+0000)
This makes things a bit easier for binding writers - the
superclass returns are only a C convenience.
svn path=/trunk/; revision=632
giscanner/glibtransformer.py
patch
|
blob
|
history
diff --git
a/giscanner/glibtransformer.py
b/giscanner/glibtransformer.py
index f007e33da2e615362b0a7830d3c8b0587eec346c..40608f87ec9c665df43906aeb84b9b45b4ce2e78 100644
(file)
--- 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