Gui: Wrap PyArg_ParseTupleAndKeywords
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
#include <Base/Interpreter.h>
|
||||
#include <Base/Tools.h>
|
||||
#include <Base/UnitsApi.h>
|
||||
#include <Base/PyWrapParseTupleAndKeywords.h>
|
||||
|
||||
#include "Selection.h"
|
||||
#include "SelectionObject.h"
|
||||
@@ -2102,9 +2103,9 @@ PyObject *SelectionSingleton::sSetPreselection(PyObject * /*self*/, PyObject *ar
|
||||
char* subname = nullptr;
|
||||
float x = 0, y = 0, z = 0;
|
||||
int type = 1;
|
||||
static char *kwlist[] = {"obj","subname","x","y","z","tp",nullptr};
|
||||
if (PyArg_ParseTupleAndKeywords(args, kwd, "O!|sfffi", kwlist,
|
||||
&(App::DocumentObjectPy::Type),&object,&subname,&x,&y,&z,&type)) {
|
||||
static const std::array<const char *, 7> kwlist{"obj", "subname", "x", "y", "z", "tp", nullptr};
|
||||
if (Base::Wrapped_ParseTupleAndKeywords(args, kwd, "O!|sfffi", kwlist, &(App::DocumentObjectPy::Type), &object,
|
||||
&subname, &x, &y, &z, &type)) {
|
||||
auto docObjPy = static_cast<App::DocumentObjectPy*>(object);
|
||||
App::DocumentObject* docObj = docObjPy->getDocumentObjectPtr();
|
||||
if (!docObj || !docObj->getNameInDocument()) {
|
||||
|
||||
Reference in New Issue
Block a user