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



commit 5ec1477d0feeb2d7d0d91477769fa5bb9c09cd1a
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]