Robot: Wrap PyArg_ParseTupleAndKeywords

This commit is contained in:
Chris Hennes
2023-08-25 13:18:54 -05:00
parent 0733261d06
commit 089a694efa

View File

@@ -23,6 +23,7 @@
#include "PreCompiled.h"
#include <Base/PlacementPy.h>
#include <Base/PyWrapParseTupleAndKeywords.h>
#include <Base/UnitsApi.h>
// inclusion of the generated files (generated out of WaypointPy.xml)
@@ -85,12 +86,14 @@ int WaypointPy::PyInit(PyObject* args, PyObject* kwd)
int tool = 0;
int base = 0;
static char* kwlist[] = { "Pos", "type","name", "vel", "cont", "tool", "base", "acc" ,nullptr };
static const std::array<const char *, 9> kwlist{"Pos", "type", "name", "vel", "cont", "tool", "base", "acc",
nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwd, "O!|ssOiiiO", kwlist,
&(Base::PlacementPy::Type), &pos, // the placement object
&type, &name, &vel, &cont, &tool, &base, &acc))
if (!Base::Wrapped_ParseTupleAndKeywords(args, kwd, "O!|ssOiiiO", kwlist,
&(Base::PlacementPy::Type), &pos, // the placement object
&type, &name, &vel, &cont, &tool, &base, &acc)) {
return -1;
}
Base::Placement TempPos = *static_cast<Base::PlacementPy*>(pos)->getPlacementPtr();
getWaypointPtr()->EndPos = TempPos;