Use PyObject_IsTrue to check argument

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

View File

@@ -278,7 +278,7 @@ PyObject* MeshPy::crossSections(PyObject *args)
}
std::vector<MeshObject::TPolylines> sections;
getMeshObjectPtr()->crossSections(csPlanes, sections, min_eps, (poly == Py_True));
getMeshObjectPtr()->crossSections(csPlanes, sections, min_eps, PyObject_IsTrue(poly) ? true : false);
// convert to Python objects
Py::List crossSections;