Fix issue with Functor_converter when return type was not bool or void.

This commit is contained in:
Mikaël Capelle
2020-05-03 13:39:04 +02:00
parent 8b118ad898
commit 221949f48b
+6 -1
View File
@@ -697,7 +697,12 @@ struct Functor_converter<RET(PARAMS... )>
RET operator()(const PARAMS &...params) {
GILock lock;
return (RET) m_Callable(params...);
if constexpr (std::is_same_v<RET, void>) {
m_Callable(params...);
}
else {
return bpy::extract<RET>(m_Callable(params...));
}
}
boost::python::object m_Callable;