summaryrefslogtreecommitdiff
path: root/gi/pygi-argument.c
diff options
context:
space:
mode:
authorSimon van der Linden <svdlinden@src.gnome.org>2009-08-13 19:23:39 +0200
committerSimon van der Linden <svdlinden@src.gnome.org>2009-08-14 23:21:25 +0200
commitb49ef5977851c788878de07f89da9cc090109e92 (patch)
tree0106b29f45a6f0560c0af98d8176a8dd588e43f0 /gi/pygi-argument.c
parente0e751f4ea4e8da261acf3b1038c5461fde7993f (diff)
downloadpygobject-b49ef5977851c788878de07f89da9cc090109e92.tar.gz
Add void marshalling support
Diffstat (limited to 'gi/pygi-argument.c')
-rw-r--r--gi/pygi-argument.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gi/pygi-argument.c b/gi/pygi-argument.c
index ee2d3669..c203f730 100644
--- a/gi/pygi-argument.c
+++ b/gi/pygi-argument.c
@@ -357,7 +357,11 @@ _pygi_g_type_info_check_object (GITypeInfo *type_info,
switch(type_tag) {
case GI_TYPE_TAG_VOID:
- PyErr_WarnEx(NULL, "unable to check an argument whose type is 'void'", 1);
+ if (object != Py_None) {
+ PyErr_Format(PyExc_TypeError, "Must be %s, not %s",
+ Py_None->ob_type->tp_name, object->ob_type->tp_name);
+ retval = 0;
+ }
break;
case GI_TYPE_TAG_BOOLEAN:
/* No check; every Python object has a truth value. */
@@ -768,7 +772,7 @@ _pygi_argument_from_object (PyObject *object,
switch (type_tag) {
case GI_TYPE_TAG_VOID:
- PyErr_WarnEx(NULL, "Unable to marshal an argument whose type is 'void'; ignoring", 1);
+ arg.v_pointer = NULL;
break;
case GI_TYPE_TAG_BOOLEAN:
{
@@ -1401,7 +1405,6 @@ _pygi_argument_to_object (GArgument *arg,
switch (type_tag) {
case GI_TYPE_TAG_VOID:
- PyErr_WarnEx(NULL, "Unable to marshal an argument whose type is 'void'; returning None", 1);
Py_INCREF(Py_None);
object = Py_None;
break;