[pygobject/gsoc2009: 51/160] Complete array support in pygi_g_argument_to_py_object
- From: Simon van der Linden <svdlinden src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pygobject/gsoc2009: 51/160] Complete array support in pygi_g_argument_to_py_object
- Date: Fri, 14 Aug 2009 21:26:22 +0000 (UTC)
commit 4f4fbe25df20e4dcc63795da0238393a8dd94b5d
Author: Simon van der Linden <svdlinden src gnome org>
Date: Wed Jul 22 11:59:27 2009 +0200
Complete array support in pygi_g_argument_to_py_object
gi/pygargument.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/gi/pygargument.c b/gi/pygargument.c
index dad51f8..ad8d337 100644
--- a/gi/pygargument.c
+++ b/gi/pygargument.c
@@ -875,20 +875,16 @@ struct_error_clean:
for(i = 0; i < array->len; i++) {
GArgument item;
PyObject *py_item;
- int retval;
item = *(GArgument *)(array->data + item_size * i);
py_item = pygi_g_argument_to_py_object(item, item_type_info);
if (py_item == NULL) {
- /* TODO */
+ Py_DECREF(object);
+ object = NULL;
break;
}
- retval = PyTuple_SetItem(object, i, py_item);
- if (retval < 0) {
- /* TODO */
- break;
- }
+ PyTuple_SET_ITEM(object, i, py_item);
}
g_base_info_unref((GIBaseInfo *)item_type_info);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]