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

@@ -1166,8 +1166,8 @@ static PyObject * makeLoft(PyObject *self, PyObject *args)
}
TopoShape myShape;
Standard_Boolean anIsSolid = (psolid == Py_True) ? Standard_True : Standard_False;
Standard_Boolean anIsRuled = (pruled == Py_True) ? Standard_True : Standard_False;
Standard_Boolean anIsSolid = PyObject_IsTrue(psolid) ? Standard_True : Standard_False;
Standard_Boolean anIsRuled = PyObject_IsTrue(pruled) ? Standard_True : Standard_False;
TopoDS_Shape aResult = myShape.makeLoft(profiles, anIsSolid, anIsRuled);
return new TopoShapePy(new TopoShape(aResult));
}