Use PyObject_IsTrue to check argument

This commit is contained in:
wmayer
2012-12-29 15:59:54 +01:00
parent 0efd86fbea
commit 1b345c193e
15 changed files with 37 additions and 29 deletions

View File

@@ -51,7 +51,8 @@ PyObject* FeaturePythonPy::addProperty(PyObject *args)
return NULL; // NULL triggers exception
Property* prop=0;
prop = getFeaturePythonPtr()->addDynamicProperty(sType,sName,sGroup,sDoc,attr,ro==Py_True,hd==Py_True);
prop = getFeaturePythonPtr()->addDynamicProperty(sType,sName,sGroup,sDoc,attr,
PyObject_IsTrue(ro) ? true : false, PyObject_IsTrue(hd) ? true : false);
if (!prop) {
std::stringstream str;