mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Correctly interpret SWIG return code of type check
This commit is contained in:
@@ -76,8 +76,7 @@
|
||||
IfcParse::IfcLateBoundEntity* cast_pyobject(PyObject* element) {
|
||||
void *arg = 0;
|
||||
int res = SWIG_ConvertPtr(element, &arg, SWIGTYPE_p_IfcParse__IfcLateBoundEntity, 0);
|
||||
if (!res) return static_cast<IfcParse::IfcLateBoundEntity*>(0);
|
||||
return reinterpret_cast<IfcParse::IfcLateBoundEntity*>(arg);
|
||||
return static_cast<IfcParse::IfcLateBoundEntity*>(SWIG_IsOK(res) ? arg : 0);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
||||
Reference in New Issue
Block a user