Skip to content

Commit 3d15982

Browse files
committed
Don't fail on void result in python wrapper
1 parent b5a7a39 commit 3d15982

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

wrap/wrapper.i

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ void populate_scope(scope_map& scope, const argument_spec& spec, PyObject* obj)
157157
$result = PyUnicode_FromString(val->c_str());
158158
} else if (abstract_voxel_storage*const* val = get_value_opt_<abstract_voxel_storage*>($1)) {
159159
$result = SWIG_NewPointerObj(SWIG_as_voidptr(*val), SWIGTYPE_p_abstract_voxel_storage, SWIG_POINTER_OWN);
160+
} else if ($1.which() == 0) {
161+
Py_INCREF(Py_None);
162+
$result = Py_None;
160163
} else {
161164
PyErr_SetString(PyExc_TypeError, "Unsupported type for symbol_value");
162165
SWIG_fail;

0 commit comments

Comments
 (0)