summaryrefslogtreecommitdiff
path: root/source4/lib/registry
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-01-06 04:13:57 +0100
committerJelmer Vernooij <jelmer@samba.org>2009-01-06 04:13:57 +0100
commitd2c70d24e12293d9b4272eb310a6a4c4582b2d92 (patch)
tree5cc5f08da2608a20e2f961b7fecdd50e9752ec50 /source4/lib/registry
parent1f8b6238dd161d29ee92902ea006158e180fa87b (diff)
downloadsamba-d2c70d24e12293d9b4272eb310a6a4c4582b2d92.tar.gz
samba-d2c70d24e12293d9b4272eb310a6a4c4582b2d92.tar.bz2
samba-d2c70d24e12293d9b4272eb310a6a4c4582b2d92.zip
py: Properly increase the reference counter of Py_None.
Diffstat (limited to 'source4/lib/registry')
-rw-r--r--source4/lib/registry/pyregistry.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source4/lib/registry/pyregistry.c b/source4/lib/registry/pyregistry.c
index 357305c4de..444b80a6fe 100644
--- a/source4/lib/registry/pyregistry.c
+++ b/source4/lib/registry/pyregistry.c
@@ -60,7 +60,7 @@ static PyObject *py_key_del_abs(PyObject *self, PyObject *args)
result = reg_key_del_abs(ctx, path);
PyErr_WERROR_IS_ERR_RAISE(result);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_get_predefined_key(PyObject *self, PyObject *args)
@@ -90,7 +90,7 @@ static PyObject *py_diff_apply(PyObject *self, PyObject *args)
result = reg_diff_apply(ctx, py_iconv_convenience(NULL), filename);
PyErr_WERROR_IS_ERR_RAISE(result);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_mount_hive(PyObject *self, PyObject *args)
@@ -123,7 +123,7 @@ static PyObject *py_mount_hive(PyObject *self, PyObject *args)
result = reg_mount_hive(ctx, py_talloc_get_ptr(py_hivekey), hkey, elements);
PyErr_WERROR_IS_ERR_RAISE(result);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *registry_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
@@ -172,7 +172,7 @@ static PyObject *py_hive_key_del(PyObject *self, PyObject *args)
PyErr_WERROR_IS_ERR_RAISE(result);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_hive_key_flush(PyObject *self)
@@ -183,7 +183,7 @@ static PyObject *py_hive_key_flush(PyObject *self)
result = hive_key_flush(key);
PyErr_WERROR_IS_ERR_RAISE(result);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_hive_key_del_value(PyObject *self, PyObject *args)
@@ -199,7 +199,7 @@ static PyObject *py_hive_key_del_value(PyObject *self, PyObject *args)
PyErr_WERROR_IS_ERR_RAISE(result);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_hive_key_set_value(PyObject *self, PyObject *args)
@@ -220,7 +220,7 @@ static PyObject *py_hive_key_set_value(PyObject *self, PyObject *args)
PyErr_WERROR_IS_ERR_RAISE(result);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyMethodDef hive_key_methods[] = {
@@ -238,7 +238,7 @@ static PyMethodDef hive_key_methods[] = {
static PyObject *hive_open(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
/* reg_open_hive */
- return Py_None;
+ Py_RETURN_NONE;
}
PyTypeObject PyHiveKey = {
@@ -383,7 +383,7 @@ static PyObject *py_get_predef_name(PyObject *self, PyObject *args)
str = reg_get_predef_name(hkey);
if (str == NULL)
- return Py_None;
+ Py_RETURN_NONE;
return PyString_FromString(str);
}