mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-19 11:43:53 +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) {
|
IfcParse::IfcLateBoundEntity* cast_pyobject(PyObject* element) {
|
||||||
void *arg = 0;
|
void *arg = 0;
|
||||||
int res = SWIG_ConvertPtr(element, &arg, SWIGTYPE_p_IfcParse__IfcLateBoundEntity, 0);
|
int res = SWIG_ConvertPtr(element, &arg, SWIGTYPE_p_IfcParse__IfcLateBoundEntity, 0);
|
||||||
if (!res) return static_cast<IfcParse::IfcLateBoundEntity*>(0);
|
return static_cast<IfcParse::IfcLateBoundEntity*>(SWIG_IsOK(res) ? arg : 0);
|
||||||
return reinterpret_cast<IfcParse::IfcLateBoundEntity*>(arg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|||||||
Reference in New Issue
Block a user