[pybank] Restore lost conversion code
- From: Johan Dahlin <johan src gnome org>
- To: svn-commits-list gnome org
- Subject: [pybank] Restore lost conversion code
- Date: Tue, 2 Jun 2009 10:45:48 -0400 (EDT)
commit 6aa0cf06508443193486a1b70000591c1cd6765f
Author: Tomeu Vizoso <tomeu sugarlabs org>
Date: Thu May 14 13:35:51 2009 +0200
Restore lost conversion code
---
bank/bank-argument.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/bank/bank-argument.c b/bank/bank-argument.c
index 464be8c..82cc712 100644
--- a/bank/bank-argument.c
+++ b/bank/bank-argument.c
@@ -275,6 +275,17 @@ pyg_argument_to_pyobject(GArgument *arg, GITypeInfo *type_info)
} else if (interface_type == GI_INFO_TYPE_ENUM) {
g_warning("pyg_argument_to_pyobject: enums not implemented");
obj = Py_None;
+ } else if ( arg->v_pointer == NULL ) {
+ obj = Py_None;
+ Py_INCREF(obj);
+ return obj;
+ } else {
+ GValue value;
+ GObject* obj = arg->v_pointer;
+ GType gtype = G_OBJECT_TYPE(obj);
+ value.g_type = gtype;
+ value.data[0].v_pointer = obj;
+ return pyg_value_as_pyobject(&value, FALSE);
}
break;
case GI_TYPE_TAG_ARRAY:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]