Base: Wrap PyArg_ParseTupleAndKeywords

This commit is contained in:
Chris Hennes
2023-08-25 13:15:59 -05:00
parent ada736696e
commit 3b79fd58b7
4 changed files with 15 additions and 10 deletions

View File

@@ -24,6 +24,7 @@
#include "PreCompiled.h"
#include "GeometryPyCXX.h"
#include <Base/PyWrapParseTupleAndKeywords.h>
// inclusion of the generated files (generated out of PlacementPy.xml)
#include "PlacementPy.h"
@@ -172,14 +173,15 @@ PyObject* PlacementPy::translate(PyObject * args)
PyObject* PlacementPy::rotate(PyObject *args, PyObject *kwds)
{
double angle{};
char *keywords[] = { "center", "axis", "angle", "comp", nullptr };
static const std::array<const char *, 6> kwlist { "center", "axis", "angle", "comp", nullptr };
Vector3d center;
Vector3d axis;
PyObject* pyComp = Py_False;
PyObject* pyComp = Py_False; // NOLINT
if (!PyArg_ParseTupleAndKeywords(args, kwds, "(ddd)(ddd)d|O!", keywords, &center.x, &center.y, &center.z,
&axis.x, &axis.y, &axis.z, &angle, &PyBool_Type, &pyComp))
if (!Base::Wrapped_ParseTupleAndKeywords(args, kwds, "(ddd)(ddd)d|O!", kwlist, &center.x, &center.y, &center.z,
&axis.x, &axis.y, &axis.z, &angle, &PyBool_Type, &pyComp)) {
return nullptr;
}
try {
/*