Part: when replacing PyArg_ParseTupleAndKeywords with Base::Wrapped_ParseTupleAndKeywords then in a few cases the negation of the expression has been removed.

See also: https://forum.freecad.org/viewtopic.php?t=80958
This commit is contained in:
wmayer
2023-09-06 11:52:14 +02:00
committed by wwmayer
parent 7bbc93e218
commit b081bb05f7
2 changed files with 12 additions and 12 deletions

View File

@@ -742,11 +742,11 @@ PyObject* BSplineCurve2dPy::approximate(PyObject *args, PyObject *kwds)
"ParamType", "Parameters", "LengthWeight", "CurvatureWeight",
"TorsionWeight", nullptr};
if (Base::Wrapped_ParseTupleAndKeywords(args, kwds, "O|isdisOddd",kwds_interp,
&obj, &degMax,
&continuity, &tol3d, &degMin,
&parType, &par,
&weight1, &weight2, &weight3)) {
if (!Base::Wrapped_ParseTupleAndKeywords(args, kwds, "O|isdisOddd",kwds_interp,
&obj, &degMax,
&continuity, &tol3d, &degMin,
&parType, &par,
&weight1, &weight2, &weight3)) {
return nullptr;
}
@@ -920,11 +920,11 @@ PyObject* BSplineCurve2dPy::interpolate(PyObject *args, PyObject *kwds)
"FinalTangent", "Tangents", "TangentFlags", "Parameters",
nullptr};
if (Base::Wrapped_ParseTupleAndKeywords(args, kwds, "O|O!dO!O!OOO",kwds_interp,
&obj, &PyBool_Type, &periodic, &tol3d,
Base::Vector2dPy::type_object(), &t1,
Base::Vector2dPy::type_object(), &t2,
&ts, &fl, &par)) {
if (!Base::Wrapped_ParseTupleAndKeywords(args, kwds, "O|O!dO!O!OOO",kwds_interp,
&obj, &PyBool_Type, &periodic, &tol3d,
Base::Vector2dPy::type_object(), &t1,
Base::Vector2dPy::type_object(), &t2,
&ts, &fl, &par)) {
return nullptr;
}

View File

@@ -562,8 +562,8 @@ PyObject* GeometryCurvePy::projectPoint(PyObject *args, PyObject* kwds)
PyObject *v;
const char *meth = "NearestPoint";
static const std::array<const char *, 3> kwlist{"Point", "Method", nullptr};
if (Base::Wrapped_ParseTupleAndKeywords(args, kwds, "O!|s", kwlist,
&Base::VectorPy::Type, &v, &meth)) {
if (!Base::Wrapped_ParseTupleAndKeywords(args, kwds, "O!|s", kwlist,
&Base::VectorPy::Type, &v, &meth)) {
return nullptr;
}