App: Wrap PyArg_ParseTupleAndKeywords

This commit is contained in:
Chris Hennes
2023-08-25 13:16:12 -05:00
parent 3b79fd58b7
commit 56d820892c
6 changed files with 45 additions and 30 deletions

View File

@@ -30,6 +30,7 @@
#include "PropertyContainer.h"
#include "Property.h"
#include "DocumentObject.h"
#include <Base/PyWrapParseTupleAndKeywords.h>
#include <boost/iostreams/device/array.hpp>
#include <boost/iostreams/stream.hpp>
@@ -466,10 +467,11 @@ PyObject* PropertyContainerPy::dumpPropertyContent(PyObject *args, PyObject *kwd
{
int compression = 3;
const char* property;
static char* kwds_def[] = {"Property", "Compression", nullptr};
static const std::array<const char *, 3> kwds_def {"Property", "Compression", nullptr};
PyErr_Clear();
if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|i", kwds_def, &property, &compression))
if (!Base::Wrapped_ParseTupleAndKeywords(args, kwds, "s|i", kwds_def, &property, &compression)) {
return nullptr;
}
Property* prop = getPropertyContainerPtr()->getPropertyByName(property);
if (!prop) {