diff --git a/src/ifcwrap/IfcGeomWrapper.i b/src/ifcwrap/IfcGeomWrapper.i index 64b1fb9bd1..1e8654f064 100644 --- a/src/ifcwrap/IfcGeomWrapper.i +++ b/src/ifcwrap/IfcGeomWrapper.i @@ -27,6 +27,15 @@ } } +// SWIG does not support bool references in a meaningful way, so the +// IfcGeom::IteratorSettings functions degrade to return a read only value +%typemap(out) double& { + $result = SWIG_From_double(*$1); +} +%typemap(out) bool& { + $result = PyBool_FromLong(static_cast(*$1)); +} + %include "../ifcgeom/IfcGeomIteratorSettings.h" %include "../ifcgeom/IfcGeomElement.h" %include "../ifcgeom/IfcGeomMaterial.h" @@ -76,15 +85,6 @@ } } -// SWIG does not support bool references in a meaningful way, so the -// IfcGeom::IteratorSettings functions degrade to return a read only value -%typemap(out) double& { - $result = SWIG_From_double(*$1); -} -%typemap(out) bool& { - $result = PyBool_FromLong(static_cast(*$1)); -} - // This does not seem to work: %ignore IfcGeom::Iterator::Iterator(const IfcGeom::IteratorSettings&, IfcParse::IfcFile*); %ignore IfcGeom::Iterator::Iterator(const IfcGeom::IteratorSettings&, void*, int);