Do not pass 0 to PyObject_IsTrue
This commit is contained in:
@@ -127,9 +127,9 @@ PyObject* MeshPy::copy(PyObject *args)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return NULL;
|
||||
|
||||
|
||||
const MeshCore::MeshKernel& kernel = getMeshObjectPtr()->getKernel();
|
||||
return new MeshPy(new MeshObject(kernel));
|
||||
return new MeshPy(new MeshObject(kernel));
|
||||
}
|
||||
|
||||
PyObject* MeshPy::read(PyObject *args)
|
||||
@@ -238,7 +238,7 @@ PyObject* MeshPy::offsetSpecial(PyObject *args)
|
||||
PyObject* MeshPy::crossSections(PyObject *args)
|
||||
{
|
||||
PyObject *obj;
|
||||
PyObject *poly=0;
|
||||
PyObject *poly=Py_False;
|
||||
float min_eps = 1.0e-2f;
|
||||
if (!PyArg_ParseTuple(args, "O!|fO!", &PyList_Type, &obj, &min_eps, &PyBool_Type, &poly))
|
||||
return 0;
|
||||
|
||||
@@ -1147,8 +1147,8 @@ static PyObject * makeLoft(PyObject *self, PyObject *args)
|
||||
return new BSplineSurfacePy(new GeomBSplineSurface(aRes));
|
||||
#else
|
||||
PyObject *pcObj;
|
||||
PyObject *psolid=0;
|
||||
PyObject *pruled=0;
|
||||
PyObject *psolid=Py_False;
|
||||
PyObject *pruled=Py_False;
|
||||
if (!PyArg_ParseTuple(args, "O!|O!O!", &(PyList_Type), &pcObj,
|
||||
&(PyBool_Type), &psolid,
|
||||
&(PyBool_Type), &pruled))
|
||||
|
||||
@@ -127,7 +127,7 @@ PyObject* BRepOffsetAPI_MakePipeShellPy::setAuxiliarySpine(PyObject *args)
|
||||
|
||||
PyObject* BRepOffsetAPI_MakePipeShellPy::add(PyObject *args)
|
||||
{
|
||||
PyObject *prof, *curv=0, *keep=0;
|
||||
PyObject *prof, *curv=Py_False, *keep=Py_False;
|
||||
if (!PyArg_ParseTuple(args, "O!|O!O!",&Part::TopoShapePy::Type,&prof
|
||||
,&PyBool_Type,&curv
|
||||
,&PyBool_Type,&keep))
|
||||
|
||||
@@ -66,7 +66,7 @@ int RectangularTrimmedSurfacePy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
||||
|
||||
PyErr_Clear();
|
||||
double param1,param2;
|
||||
PyObject *utrim=0, *sense=Py_True;
|
||||
PyObject *utrim=Py_False, *sense=Py_True;
|
||||
if (PyArg_ParseTuple(args, "O!ddO!|O!",&(Part::GeometrySurfacePy::Type),&surf,
|
||||
¶m1,¶m2,&PyBool_Type,&utrim,&PyBool_Type,&sense)) {
|
||||
Standard_Boolean UTrim = PyObject_IsTrue(utrim);
|
||||
|
||||
Reference in New Issue
Block a user