Skip to content

Commit

Permalink
Don't fail on void result in python wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
aothms committed Dec 16, 2023
1 parent b5a7a39 commit 3d15982
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wrap/wrapper.i
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ void populate_scope(scope_map& scope, const argument_spec& spec, PyObject* obj)
$result = PyUnicode_FromString(val->c_str());
} else if (abstract_voxel_storage*const* val = get_value_opt_<abstract_voxel_storage*>($1)) {
$result = SWIG_NewPointerObj(SWIG_as_voidptr(*val), SWIGTYPE_p_abstract_voxel_storage, SWIG_POINTER_OWN);
} else if ($1.which() == 0) {
Py_INCREF(Py_None);
$result = Py_None;
} else {
PyErr_SetString(PyExc_TypeError, "Unsupported type for symbol_value");
SWIG_fail;
Expand Down

0 comments on commit 3d15982

Please sign in to comment.