mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-11 22:31:55 +00:00
Return empty list when for ifc datatypes not encountered in file
This commit is contained in:
@@ -42,7 +42,7 @@
|
|||||||
%rename("Entity") IfcUntypedEntity;
|
%rename("Entity") IfcUntypedEntity;
|
||||||
|
|
||||||
%typemap(out) IfcEntities {
|
%typemap(out) IfcEntities {
|
||||||
const unsigned size = $1->Size();
|
const unsigned size = $1 ? $1->Size() : 0;
|
||||||
$result = PyList_New(size);
|
$result = PyList_New(size);
|
||||||
for (unsigned i = 0; i < size; ++i) {
|
for (unsigned i = 0; i < size; ++i) {
|
||||||
PyObject *o = SWIG_NewPointerObj(SWIG_as_voidptr((*$1)[i]), SWIGTYPE_p_Ifc__IfcUntypedEntity, 0);
|
PyObject *o = SWIG_NewPointerObj(SWIG_as_voidptr((*$1)[i]), SWIGTYPE_p_Ifc__IfcUntypedEntity, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user