RE: Correct use of Wrapped_ParseTupleAndKeywords

This commit is contained in:
Chris Hennes
2023-09-01 15:49:02 -05:00
committed by wwmayer
parent 3a9135fd30
commit 118dc0c6c3
2 changed files with 25 additions and 25 deletions

View File

@@ -62,7 +62,7 @@ PyObject* PersistencePy::dumpContent(PyObject *args, PyObject *kwds)
int compression = 3;
static const std::array<const char *, 2> kwds_def {"Compression", nullptr};
PyErr_Clear();
if (!Wrapped_ParseTupleAndKeywords(args, kwds, "|i", kwds_def, &compression)) {
if (!Base::Wrapped_ParseTupleAndKeywords(args, kwds, "|i", kwds_def, &compression)) {
return nullptr;
}

View File

@@ -313,9 +313,9 @@ Mesh.show(m)
int ksearch=5;
double mu=2.5;
static char* kwds_greedy[] = {"Points", "SearchRadius", "Mu", "KSearch",
static const std::array<const char*,6> kwds_greedy {"Points", "SearchRadius", "Mu", "KSearch",
"Normals", NULL};
if (!Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!d|diO", kwds_greedy,
if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!d|diO", kwds_greedy,
&(Points::PointsPy::Type), &pts,
&searchRadius, &mu, &ksearch, &vec))
throw Py::Exception();
@@ -351,9 +351,9 @@ Mesh.show(m)
int solverDivide=-1;
double samplesPerNode=-1.0;
static char* kwds_poisson[] = {"Points", "KSearch", "OctreeDepth", "SolverDivide",
static const std::array<const char*,7> kwds_poisson {"Points", "KSearch", "OctreeDepth", "SolverDivide",
"SamplesPerNode", "Normals", NULL};
if (!Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|iiidO", kwds_poisson,
if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|iiidO", kwds_poisson,
&(Points::PointsPy::Type), &pts,
&ksearch, &octreeDepth, &solverDivide, &samplesPerNode, &vec))
throw Py::Exception();
@@ -420,8 +420,8 @@ Mesh.show(m)
int width;
int height;
static char* kwds_view[] = {"Points", "Width", "Height", NULL};
if (!Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|ii", kwds_view,
static const std::array<const char*,4> kwds_view {"Points", "Width", "Height", NULL};
if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|ii", kwds_view,
&(Points::PointsPy::Type), &pts,
&width, &height))
throw Py::Exception();
@@ -445,8 +445,8 @@ Mesh.show(m)
PyObject *vec = 0;
int ksearch=5;
static char* kwds_greedy[] = {"Points", "KSearch", "Normals", NULL};
if (!Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|iO", kwds_greedy,
static const std::array<const char*,4> kwds_greedy {"Points", "KSearch", "Normals", NULL};
if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|iO", kwds_greedy,
&(Points::PointsPy::Type), &pts,
&ksearch, &vec))
throw Py::Exception();
@@ -477,8 +477,8 @@ Mesh.show(m)
PyObject *vec = 0;
int ksearch=5;
static char* kwds_greedy[] = {"Points", "KSearch", "Normals", NULL};
if (!Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|iO", kwds_greedy,
static const std::array<const char*,4> kwds_greedy {"Points", "KSearch", "Normals", NULL};
if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|iO", kwds_greedy,
&(Points::PointsPy::Type), &pts,
&ksearch, &vec))
throw Py::Exception();
@@ -527,8 +527,8 @@ Mesh.show(m)
PyObject *vec = 0;
int ksearch=5;
static char* kwds_greedy[] = {"Points", "KSearch", "Normals", NULL};
if (!Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|iO", kwds_greedy,
static const std::array<const char*,4> kwds_greedy {"Points", "KSearch", "Normals", NULL};
if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|iO", kwds_greedy,
&(Points::PointsPy::Type), &pts,
&ksearch, &vec))
throw Py::Exception();
@@ -566,9 +566,9 @@ Mesh.show(m)
double boundarySmoothness = 0.2;
double boundaryWeight = 0.0;
static char* kwds_approx[] = {"Points", "Degree", "Refinement", "Iterations",
static const std::array<const char*,9> kwds_approx {"Points", "Degree", "Refinement", "Iterations",
"InteriorSmoothness", "InteriorWeight", "BoundarySmoothness", "BoundaryWeight", NULL};
if (!Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|iiidddd", kwds_approx,
if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|iiidddd", kwds_approx,
&(Points::PointsPy::Type), &pts,
&degree, &refinement, &iterations,
&interiorSmoothness, &interiorWeight,
@@ -602,8 +602,8 @@ Mesh.show(m)
double voxDimY = 0;
double voxDimZ = 0;
static char* kwds_voxel[] = {"Points", "DimX", "DimY", "DimZ", NULL};
if (!Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!d|dd", kwds_voxel,
static const std::array<const char*,5> kwds_voxel {"Points", "DimX", "DimY", "DimZ", NULL};
if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!d|dd", kwds_voxel,
&(Points::PointsPy::Type), &pts,
&voxDimX, &voxDimY, &voxDimZ))
throw Py::Exception();
@@ -645,8 +645,8 @@ Mesh.show(m)
int ksearch=0;
double searchRadius=0;
static char* kwds_normals[] = {"Points", "KSearch", "SearchRadius", NULL};
if (!Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|id", kwds_normals,
static const std::array<const char*,4> kwds_normals {"Points", "KSearch", "SearchRadius", NULL};
if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|id", kwds_normals,
&(Points::PointsPy::Type), &pts,
&ksearch, &searchRadius))
throw Py::Exception();
@@ -674,8 +674,8 @@ Mesh.show(m)
PyObject *vec = 0;
int ksearch=5;
static char* kwds_segment[] = {"Points", "KSearch", "Normals", NULL};
if (!Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|iO", kwds_segment,
static const std::array<const char*,4> kwds_segment {"Points", "KSearch", "Normals", NULL};
if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|iO", kwds_segment,
&(Points::PointsPy::Type), &pts,
&ksearch, &vec))
throw Py::Exception();
@@ -714,8 +714,8 @@ Mesh.show(m)
PyObject *pts;
int ksearch=5;
static char* kwds_segment[] = {"Points", "KSearch", NULL};
if (!Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|i", kwds_segment,
static const std::array<const char*,3> kwds_segment {"Points", "KSearch", NULL};
if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|i", kwds_segment,
&(Points::PointsPy::Type), &pts, &ksearch))
throw Py::Exception();
@@ -783,8 +783,8 @@ Points.show(np)
PyObject *vec = nullptr;
const char* sacModelType = nullptr;
static char* kwds_sample[] = {"SacModel", "Points", "Normals", NULL};
if (!Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "sO!|O", kwds_sample,
static const std::array<const char*,4> kwds_sample {"SacModel", "Points", "Normals", NULL};
if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "sO!|O", kwds_sample,
&sacModelType, &(Points::PointsPy::Type), &pts, &vec))
throw Py::Exception();