[gobject-introspection] Automatically turn Gdk.Rectangle gtype into cairo.RectangleInt



commit af0cca3b01d852c7e3afd22a57e5163b2e8885bd
Author: Pavel Holejsovsky <pavel holejsovsky gmail com>
Date:   Tue Aug 2 07:41:54 2011 +0200

    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

 giscanner/ast.py |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/giscanner/ast.py b/giscanner/ast.py
index 9060519..d4780f9 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):



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