From d2c70d24e12293d9b4272eb310a6a4c4582b2d92 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 6 Jan 2009 04:13:57 +0100 Subject: py: Properly increase the reference counter of Py_None. --- source4/param/pyparam.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/param') diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c index 69c2613a09..f6a0b4f674 100644 --- a/source4/param/pyparam.c +++ b/source4/param/pyparam.c @@ -150,7 +150,7 @@ static PyObject *py_lp_ctx_load(py_talloc_Object *self, PyObject *args) PyErr_Format(PyExc_RuntimeError, "Unable to load file %s", filename); return NULL; } - return Py_None; + Py_RETURN_NONE; } static PyObject *py_lp_ctx_load_default(py_talloc_Object *self) @@ -162,7 +162,7 @@ static PyObject *py_lp_ctx_load_default(py_talloc_Object *self) PyErr_SetString(PyExc_RuntimeError, "Unable to load default file"); return NULL; } - return Py_None; + Py_RETURN_NONE; } static PyObject *py_lp_ctx_get(py_talloc_Object *self, PyObject *args) @@ -175,7 +175,7 @@ static PyObject *py_lp_ctx_get(py_talloc_Object *self, PyObject *args) ret = py_lp_ctx_get_helper(self->ptr, section_name, param_name); if (ret == NULL) - return Py_None; + Py_RETURN_NONE; return ret; } @@ -210,7 +210,7 @@ static PyObject *py_lp_ctx_set(py_talloc_Object *self, PyObject *args) return NULL; } - return Py_None; + Py_RETURN_NONE; } static PyObject *py_lp_ctx_private_path(py_talloc_Object *self, PyObject *args) -- cgit