Part: Fix compilation with Qt6/MSVC

-/permissive does not allow the original unwrapped call to ParseTupleAndKeywords
This commit is contained in:
Chris Hennes
2024-08-22 19:16:46 -05:00
parent ebf02483af
commit baec1037d8

View File

@@ -22,6 +22,8 @@
#include "PreCompiled.h"
#include <Base/PyWrapParseTupleAndKeywords.h>
#include "PartFeature.h"
// inclusion of the generated files (generated out of PartFeaturePy.xml)
@@ -42,9 +44,11 @@ PyObject *PartFeaturePy::getElementHistory(PyObject *args, PyObject *kwds) {
PyObject *recursive = Py_True;
PyObject *sameType = Py_False;
PyObject *showName = Py_False;
static char *kwlist[] = {"elementName", "recursive", "sameType", "showName", nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|OOO", kwlist, &name, &recursive, &sameType, &showName))
static const std::array<const char *, 5> kwlist{"elementName", "recursive", "sameType", "showName", nullptr};
if (!Base::Wrapped_ParseTupleAndKeywords(args, kwds, "s|OOO", kwlist, &name, &recursive, &sameType, &showName)) {
return {};
}
auto feature = getFeaturePtr();
Py::List list;