[pygobject/pygobject-2-28] Use _gi.Struct to wrap fundamentals



commit 3f6bba909486d0ad1a27592fcf09c7ac8744fded
Author: Tomeu Vizoso <tomeu vizoso collabora co uk>
Date:   Mon Jun 6 17:38:21 2011 +0200

    Use _gi.Struct to wrap fundamentals
    
    https://bugzilla.gnome.org/show_bug.cgi?id=647509

 gi/module.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gi/module.py b/gi/module.py
index 463d975..70df76c 100644
--- a/gi/module.py
+++ b/gi/module.py
@@ -157,7 +157,9 @@ class IntrospectionModule(object):
             elif isinstance(info, (StructInfo, UnionInfo)):
                 if g_type.is_a(gobject.TYPE_BOXED):
                     bases = (Boxed,)
-                elif g_type.is_a(gobject.TYPE_POINTER) or g_type == gobject.TYPE_NONE:
+                elif g_type.is_a(gobject.TYPE_POINTER) or \
+                     g_type == gobject.TYPE_NONE or \
+                     g_type.fundamental == g_type:
                     bases = (Struct,)
                 else:
                     raise TypeError("unable to create a wrapper for %s.%s" % (info.get_namespace(), info.get_name()))



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