summaryrefslogtreecommitdiff
path: root/source4/auth/credentials
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/auth/credentials
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/auth/credentials')
-rw-r--r--source4/auth/credentials/pycredentials.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source4/auth/credentials/pycredentials.c b/source4/auth/credentials/pycredentials.c
index 4fa9fe5696..903ca2f267 100644
--- a/source4/auth/credentials/pycredentials.c
+++ b/source4/auth/credentials/pycredentials.c
@@ -37,7 +37,7 @@ struct cli_credentials *cli_credentials_from_py_object(PyObject *py_obj)
static PyObject *PyString_FromStringOrNULL(const char *str)
{
if (str == NULL)
- return Py_None;
+ Py_RETURN_NONE;
return PyString_FromString(str);
}
@@ -144,7 +144,7 @@ static PyObject *py_creds_is_anonymous(py_talloc_Object *self)
static PyObject *py_creds_set_anonymous(py_talloc_Object *self)
{
cli_credentials_set_anonymous(self->ptr);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_creds_authentication_requested(py_talloc_Object *self)
@@ -170,7 +170,7 @@ static PyObject *py_creds_parse_string(py_talloc_Object *self, PyObject *args)
return NULL;
cli_credentials_parse_string(self->ptr, newval, obt);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_creds_get_nt_hash(py_talloc_Object *self)
@@ -187,7 +187,7 @@ static PyObject *py_creds_set_kerberos_state(py_talloc_Object *self, PyObject *a
return NULL;
cli_credentials_set_kerberos_state(self->ptr, state);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_creds_guess(py_talloc_Object *self, PyObject *args)
@@ -203,7 +203,7 @@ static PyObject *py_creds_guess(py_talloc_Object *self, PyObject *args)
cli_credentials_guess(self->ptr, lp_ctx);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_creds_set_machine_account(py_talloc_Object *self, PyObject *args)
@@ -221,7 +221,7 @@ static PyObject *py_creds_set_machine_account(py_talloc_Object *self, PyObject *
status = cli_credentials_set_machine_account(self->ptr, lp_ctx);
PyErr_NTSTATUS_IS_ERR_RAISE(status);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyMethodDef py_creds_methods[] = {