[pygobject] Skip marshalling NULL output arguments in Python closures
- From: Simon Feltman <sfeltman src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Skip marshalling NULL output arguments in Python closures
- Date: Wed, 20 Aug 2014 20:58:42 +0000 (UTC)
commit 92f0d6ebf9b67729d8253e15fce77b0ad0375573
Author: Simon Feltman <sfeltman src gnome org>
Date: Wed Aug 20 13:39:31 2014 -0700
Skip marshalling NULL output arguments in Python closures
Skip marshalling optional output arguments which are passed NULL
as the memory location. This fixes fallout from bug 727004.
https://bugzilla.gnome.org/show_bug.cgi?id=735090
gi/pygi-closure.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gi/pygi-closure.c b/gi/pygi-closure.c
index 15c6767..599503f 100644
--- a/gi/pygi-closure.c
+++ b/gi/pygi-closure.c
@@ -371,7 +371,8 @@ _pygi_closure_convert_arguments (PyGIInvokeState *state,
for (i = 0; i < _pygi_callable_cache_args_len (cache); i++) {
PyGIArgCache *arg_cache = g_ptr_array_index (cache->args_cache, i);
- if (arg_cache->direction & PYGI_DIRECTION_FROM_PYTHON) {
+ if (arg_cache->direction & PYGI_DIRECTION_FROM_PYTHON &&
+ state->arg_values[i].v_pointer) {
state->arg_pointers[i].v_pointer = state->arg_values[i].v_pointer;
state->arg_values[i] = *(GIArgument *) state->arg_values[i].v_pointer;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]