[pygobject/invoke-rewrite] [gi] allow marshalling None for hashes
- From: John Palmieri <johnp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject/invoke-rewrite] [gi] allow marshalling None for hashes
- Date: Wed, 19 Jan 2011 14:42:31 +0000 (UTC)
commit f0b17605ed2eb917b350654b070984beb553eae3
Author: John (J5) Palmieri <johnp redhat com>
Date: Wed Jan 19 09:41:13 2011 -0500
[gi] allow marshalling None for hashes
gi/pygi-argument.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gi/pygi-argument.c b/gi/pygi-argument.c
index 026af73..c38c0c4 100644
--- a/gi/pygi-argument.c
+++ b/gi/pygi-argument.c
@@ -2800,6 +2800,11 @@ _pygi_marshal_in_ghash (PyGIInvokeState *state,
GHashTable *hash_ = NULL;
PyGIHashCache *hash_cache = (PyGIHashCache *)arg_cache;
+ if (py_arg == Py_None) {
+ arg->v_pointer = NULL;
+ return TRUE;
+ }
+
py_keys = PyMapping_Keys(py_arg);
if (py_keys == NULL) {
PyErr_Format (PyExc_TypeError, "Must be mapping, not %s",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]