summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bindings/python/gpod.i6
1 files changed, 5 insertions, 1 deletions
diff --git a/bindings/python/gpod.i b/bindings/python/gpod.i
index 482e5eb..1c0edc7 100644
--- a/bindings/python/gpod.i
+++ b/bindings/python/gpod.i
@@ -81,13 +81,17 @@ typedef char gchar;
long ival;
ival = PyInt_AsLong($input);
if (( ival > 255 ) || ( ival < 0 )) {
- PyErr_SetString(PyExc_ValueError, "Value must be between 0 and 255");
+ PyErr_SetString(PyExc_ValueError, "$symname: Value must be between 0 and 255");
SWIG_fail;
} else {
$1 = (guint8) ival;
}
}
+%typemap(out) guint8 {
+ $result = PyInt_FromLong($1);
+}
+
typedef int gboolean;
typedef int gint32;