summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Holejsovsky <pavel.holejsovsky@gmail.com>2011-08-02 07:41:54 +0200
committerJohan Dahlin <jdahlin@litl.com>2011-08-13 09:42:37 -0300
commit5ec1477d0feeb2d7d0d91477769fa5bb9c09cd1a (patch)
treefe1561d17d42d525d6c61e1d64828796ce2ac55c
parent4a4cc95d13eef2503b73a01a88dcc37c733c3a30 (diff)
downloadgobject-introspection-5ec1477d0feeb2d7d0d91477769fa5bb9c09cd1a.tar.gz
Automatically turn Gdk.Rectangle gtype into cairo.RectangleInt
Gdk.Rectangle is 'boxed alias', which is not currently weel supported by g-i. Work around by transforming Gdk.Rectangle gtype into cairo.RectangleInt. https://bugzilla.gnome.org/show_bug.cgi?id=655423
-rw-r--r--giscanner/ast.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/giscanner/ast.py b/giscanner/ast.py
index 90605194..d4780f9e 100644
--- a/giscanner/ast.py
+++ b/giscanner/ast.py
@@ -99,6 +99,13 @@ in contrast to the other create_type() functions."""
bare_utf8.ctype = None
return Array(None, bare_utf8, ctype=None, gtype_name=gtype_name,
is_const=False)
+
+ # Workaround for Gdk.Rectangle being boxed alias for
+ # cairo.RectangleInt. G-I does not support boxing of aliases.
+ # See https://bugzilla.gnome.org/show_bug.cgi?id=655423
+ if gtype_name == 'GdkRectangle':
+ gtype_name = 'CairoRectangleInt'
+
return cls(gtype_name=gtype_name)
def get_giname(self):