From 17a25e0903585abae2f93fdd6f2a79c4b396e05f Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 14 Jul 2020 19:46:17 +0200 Subject: [PATCH] fix docstring and segmentation fault in Application::sNewDocument --- src/App/ApplicationPy.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App/ApplicationPy.cpp b/src/App/ApplicationPy.cpp index a03b881c91..0aa2c16b78 100644 --- a/src/App/ApplicationPy.cpp +++ b/src/App/ApplicationPy.cpp @@ -119,7 +119,7 @@ PyMethodDef Application::Methods[] = { // "saveDocument(string) -- Save the document to a file."}, // {"saveDocumentAs", (PyCFunction) Application::sSaveDocumentAs, METH_VARARGS}, {"newDocument", reinterpret_cast(reinterpret_cast( Application::sNewDocument )), METH_VARARGS|METH_KEYWORDS, - "newDocument(name, label=None, hidden=False, tmp=False) -> object\n" + "newDocument(name, label=None, hidden=False, temp=False) -> object\n" "Create a new document with a given name.\n\n" "name: unique document name which is checked automatically.\n" "label: optional user changeable label for the document.\n" @@ -273,7 +273,7 @@ PyObject* Application::sNewDocument(PyObject * /*self*/, PyObject *args, PyObjec PyObject *temp = Py_False; static char *kwlist[] = {"name","label","hidden","temp",0}; if (!PyArg_ParseTupleAndKeywords(args, kwd, "|etetOO", kwlist, - "utf-8", &docName, "utf-8", &usrName, &hidden)) + "utf-8", &docName, "utf-8", &usrName, &hidden, &temp)) return NULL; PY_TRY {