Map opt<bool> in taxonony to none,false,true

This commit is contained in:
Thomas Krijnen
2025-09-19 13:23:29 +02:00
parent f659b9bb7b
commit f3dedba320
+8
View File
@@ -112,6 +112,14 @@ std::pair<char const*, size_t> vector_to_buffer(const T& t) {
}
}
%typemap(out) boost::optional<bool> {
if ($1) {
$result = PyBool_FromLong(*$1 ? 1 : 0);
} else {
Py_INCREF(Py_None);
$result = Py_None;
}
}
%typemap(in) ifcopenshell::geometry::taxonomy::item::ptr {
// @this is really annoying, but apparently inheritance