[pygobject] Use _gi.Struct to wrap fundamentals
- From: John Palmieri <johnp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Use _gi.Struct to wrap fundamentals
- Date: Wed, 8 Jun 2011 02:55:47 +0000 (UTC)
commit 2d73012e5dbcc45a5782a6c119dfb272c14b5a61
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]