From 2bda3a3207fb0523abe31f4686e3a65f71a77e73 Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Thu, 13 Apr 2017 11:26:22 +0800 Subject: [PATCH] Path.Area: return Py_None with ref counting --- src/Mod/Path/App/AreaPyImp.cpp | 2 ++ src/Mod/Path/App/FeatureAreaPyImp.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/src/Mod/Path/App/AreaPyImp.cpp b/src/Mod/Path/App/AreaPyImp.cpp index 8d2090dac4..2613662145 100644 --- a/src/Mod/Path/App/AreaPyImp.cpp +++ b/src/Mod/Path/App/AreaPyImp.cpp @@ -38,6 +38,7 @@ static PyObject * areaAbort(PyObject *, PyObject *args, PyObject *kwd) { if (!PyArg_ParseTupleAndKeywords(args,kwd,"|O",kwlist,&pObj)) return 0; Area::abort(PyObject_IsTrue(pObj)); + Py_INCREF(Py_None); return Py_None; } @@ -69,6 +70,7 @@ static PyObject * areaSetParams(PyObject *, PyObject *args, PyObject *kwd) { PARAM_FOREACH(AREA_GET,AREA_PARAMS_STATIC_CONF) Area::setDefaultParams(params); + Py_INCREF(Py_None); return Py_None; } diff --git a/src/Mod/Path/App/FeatureAreaPyImp.cpp b/src/Mod/Path/App/FeatureAreaPyImp.cpp index f6b9c51267..e33f6a019b 100644 --- a/src/Mod/Path/App/FeatureAreaPyImp.cpp +++ b/src/Mod/Path/App/FeatureAreaPyImp.cpp @@ -77,6 +77,7 @@ PyObject* FeatureAreaPy::setParams(PyObject *args, PyObject *keywds) //populate properties with the CONF variables PARAM_FOREACH(AREA_GET,AREA_PARAMS_CONF) + Py_INCREF(Py_None); return Py_None; }