Use PyObject_IsTrue to check argument
This commit is contained in:
@@ -73,7 +73,8 @@ PyObject* ViewProviderPythonFeaturePy::addProperty(PyObject *args)
|
||||
return NULL; // NULL triggers exception
|
||||
|
||||
App::Property* prop=0;
|
||||
prop = getViewProviderPythonFeaturePtr()->addDynamicProperty(sType,sName,sGroup,sDoc,attr,ro==Py_True,hd==Py_True);
|
||||
prop = getViewProviderPythonFeaturePtr()->addDynamicProperty(sType,sName,sGroup,sDoc,attr,
|
||||
PyObject_IsTrue(ro) ? true : false, PyObject_IsTrue(hd) ? true : false);
|
||||
|
||||
if (!prop) {
|
||||
std::stringstream str;
|
||||
|
||||
Reference in New Issue
Block a user