[pygobject/invoke-rewrite] [gi] allow marshalling strings as None
- From: John Palmieri <johnp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject/invoke-rewrite] [gi] allow marshalling strings as None
- Date: Wed, 19 Jan 2011 14:45:33 +0000 (UTC)
commit 7f08fd5c33ee5c9907f5becbe2f21fb7122d6e19
Author: John (J5) Palmieri <johnp redhat com>
Date: Wed Jan 19 09:45:09 2011 -0500
[gi] allow marshalling strings as None
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 e0f3bf0..9ee3e13 100644
--- a/gi/pygi-argument.c
+++ b/gi/pygi-argument.c
@@ -2480,6 +2480,11 @@ _pygi_marshal_in_utf8 (PyGIInvokeState *state,
{
gchar *string_;
+ if (py_arg == Py_None) {
+ arg->v_pointer = NULL;
+ return TRUE;
+ }
+
if (PyUnicode_Check(py_arg)) {
PyObject *pystr_obj = PyUnicode_AsUTF8String (py_arg);
if (!pystr_obj)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]