diff options
| author | Johan Dahlin <johan@gnome.org> | 2007-04-30 02:43:37 +0000 |
|---|---|---|
| committer | Johan Dahlin <johan@src.gnome.org> | 2007-04-30 02:43:37 +0000 |
| commit | 958b9aa52ce7a5c774f26f92adea06579242b28a (patch) | |
| tree | 2b76e24a5e12a25cc03bd7b1298b933b08db0a2f /gobject | |
| parent | 7da08ab393e14d020d77d3e67db4edbc2742e95f (diff) | |
Treat None in a GValueArray as pointer/NULL, patch by Ed Catmur, fixes
2007-04-29 Johan Dahlin <johan@gnome.org>
* gobject/pygtype.c: (pyg_value_array_from_pyobject):
* tests/test_gtype.py:
* tests/testhelpermodule.c: (_wrap_test_value_array):
Treat None in a GValueArray as pointer/NULL, patch by
Ed Catmur, fixes #352209.
svn path=/trunk/; revision=656
Diffstat (limited to 'gobject')
| -rw-r--r-- | gobject/pygtype.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gobject/pygtype.c b/gobject/pygtype.c index 0015b42..5606e2a 100644 --- a/gobject/pygtype.c +++ b/gobject/pygtype.c @@ -628,6 +628,8 @@ pyg_value_array_from_pyobject(GValue *value, if (pspec && pspec->element_spec) type = G_PARAM_SPEC_VALUE_TYPE(pspec->element_spec); + else if (item == Py_None) + type = G_TYPE_POINTER; /* store None as NULL */ else { type = pyg_type_from_object((PyObject *) item->ob_type); if (! type) { |
