python: Ensure reference counts are properly incremented
[samba.git] / lib / talloc / pytalloc.c
index 15e4232f0c85aa73c5452ad12bf350eee01e4fd2..41decc45f613750d3e5a9315ab7f481190fba6a6 100644 (file)
@@ -41,7 +41,7 @@ static PyObject *pytalloc_report_full(PyObject *self, PyObject *args)
        } else {
                talloc_report_full(pytalloc_get_mem_ctx(py_obj), stdout);
        }
-       return Py_None;
+       Py_RETURN_NONE;
 }
 
 /* enable null tracking */
@@ -49,7 +49,7 @@ static PyObject *pytalloc_enable_null_tracking(PyObject *self,
                PyObject *Py_UNUSED(ignored))
 {
        talloc_enable_null_tracking();
-       return Py_None;
+       Py_RETURN_NONE;
 }
 
 /* return the number of talloc blocks */