[pybank] Pass the right pointer to pyg_argument_to_pyobject
- From: Johan Dahlin <johan src gnome org>
- To: svn-commits-list gnome org
- Subject: [pybank] Pass the right pointer to pyg_argument_to_pyobject
- Date: Tue, 2 Jun 2009 10:47:13 -0400 (EDT)
commit 5f8f164a1a29c5b894a9aebe111f07bd14fe447c
Author: Tomeu Vizoso <tomeu sugarlabs org>
Date: Wed May 27 16:45:53 2009 +0200
Pass the right pointer to pyg_argument_to_pyobject
---
bank/bank-argument.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/bank/bank-argument.c b/bank/bank-argument.c
index fb1de8e..259adb6 100644
--- a/bank/bank-argument.c
+++ b/bank/bank-argument.c
@@ -203,7 +203,7 @@ pyarray_to_pyobject(gpointer array, int length, GITypeInfo *type_info)
for( i = 0; i < length; i++ ) {
gpointer current_element = array + i * size;
- child_obj = pyg_argument_to_pyobject(current_element, element_type);
+ child_obj = pyg_argument_to_pyobject(¤t_element, element_type);
if (child_obj == NULL) {
Py_DECREF(py_list);
return NULL;
@@ -324,6 +324,8 @@ pyg_argument_to_pyobject(GArgument *arg, GITypeInfo *type_info)
size = g_struct_info_get_size ((GIStructInfo*)interface_info);
buffer = PyBuffer_FromReadWriteMemory(arg->v_pointer, size);
+ if (buffer == NULL)
+ return NULL;
PyObject_SetAttrString(obj, "__buffer__", buffer);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]