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

@@ -27,6 +27,7 @@
#include "Persistence.h"
#include "Writer.h"
#include <Base/PyWrapParseTupleAndKeywords.h>
// inclusion of the generated files (generated By PersitancePy.xml)
#include "PersistencePy.h"
@@ -59,9 +60,9 @@ Py::Int PersistencePy::getMemSize() const
PyObject* PersistencePy::dumpContent(PyObject *args, PyObject *kwds)
{
int compression = 3;
static char* kwds_def[] = {"Compression",nullptr};
static const std::array<const char *, 2> kwds_def {"Compression", nullptr};
PyErr_Clear();
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|i", kwds_def, &compression)) {
if (!Wrapped_ParseTupleAndKeywords(args, kwds, "|i", kwds_def, &compression)) {
return nullptr;
}