Part: Wrap PyArg_ParseTupleAndKeywords
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#endif
|
||||
|
||||
#include <Base/VectorPy.h>
|
||||
#include <Base/PyWrapParseTupleAndKeywords.h>
|
||||
|
||||
#include "GeomPlate/PointConstraintPy.h"
|
||||
#include "GeomPlate/PointConstraintPy.cpp"
|
||||
@@ -47,10 +48,11 @@ int PointConstraintPy::PyInit(PyObject* args, PyObject* kwds)
|
||||
int order = 0;
|
||||
double tolDist = 0.0001;
|
||||
|
||||
static char* keywords[] = {"Point", "Order", "TolDist", nullptr};
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!|id", keywords,
|
||||
&(Base::VectorPy::Type), &pt, &order, &tolDist))
|
||||
static const std::array<const char *, 4> keywords {"Point", "Order", "TolDist", nullptr};
|
||||
if (!Base::Wrapped_ParseTupleAndKeywords(args, kwds, "O!|id", keywords, &(Base::VectorPy::Type), &pt, &order,
|
||||
&tolDist)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
try {
|
||||
std::unique_ptr<GeomPlate_PointConstraint> ptr;
|
||||
|
||||
Reference in New Issue
Block a user