summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/credentials/pycredentials.c12
-rw-r--r--source4/lib/com/pycom.c2
-rw-r--r--source4/lib/ldb/pyldb.c72
-rw-r--r--source4/lib/messaging/pymessaging.c8
-rw-r--r--source4/lib/registry/pyregistry.c18
-rw-r--r--source4/librpc/ndr/py_security.c10
-rw-r--r--source4/librpc/rpc/pyrpc.c4
-rw-r--r--source4/param/pyparam.c8
-rw-r--r--source4/scripting/python/pyglue.c16
-rw-r--r--source4/web_server/wsgi.c8
10 files changed, 79 insertions, 79 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[] = {
diff --git a/source4/lib/com/pycom.c b/source4/lib/com/pycom.c
index 9222be438d..55f1fd21be 100644
--- a/source4/lib/com/pycom.c
+++ b/source4/lib/com/pycom.c
@@ -56,7 +56,7 @@ static PyObject *py_get_class_object(PyObject *self, PyObject *args)
/* FIXME: Magic, integrate with stubs generated by pidl. */
- return Py_None;
+ Py_RETURN_NONE;
}
static struct PyMethodDef com_methods[] = {
diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c
index 0dda9aa05b..0bc644716d 100644
--- a/source4/lib/ldb/pyldb.c
+++ b/source4/lib/ldb/pyldb.c
@@ -101,7 +101,7 @@ static PyObject *PyLdbResult_FromResult(struct ldb_result *result)
PyObject *ret;
int i;
if (result == NULL) {
- return Py_None;
+ Py_RETURN_NONE;
}
ret = PyList_New(result->count);
for (i = 0; i < result->count; i++) {
@@ -370,7 +370,7 @@ static PyObject *py_ldb_set_debug(PyLdbObject *self, PyObject *args)
/* FIXME: Where do we DECREF cb ? */
PyErr_LDB_ERROR_IS_ERR_RAISE(ldb_set_debug(self->ldb_ctx, py_ldb_debug, cb), PyLdb_AsLdbContext(self));
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_ldb_set_create_perms(PyTypeObject *self, PyObject *args)
@@ -381,7 +381,7 @@ static PyObject *py_ldb_set_create_perms(PyTypeObject *self, PyObject *args)
ldb_set_create_perms(PyLdb_AsLdbContext(self), perms);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_ldb_set_modules_dir(PyTypeObject *self, PyObject *args)
@@ -392,31 +392,31 @@ static PyObject *py_ldb_set_modules_dir(PyTypeObject *self, PyObject *args)
ldb_set_modules_dir(PyLdb_AsLdbContext(self), modules_dir);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_ldb_transaction_start(PyLdbObject *self)
{
PyErr_LDB_ERROR_IS_ERR_RAISE(ldb_transaction_start(PyLdb_AsLdbContext(self)), PyLdb_AsLdbContext(self));
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_ldb_transaction_commit(PyLdbObject *self)
{
PyErr_LDB_ERROR_IS_ERR_RAISE(ldb_transaction_commit(PyLdb_AsLdbContext(self)), PyLdb_AsLdbContext(self));
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_ldb_transaction_cancel(PyLdbObject *self)
{
PyErr_LDB_ERROR_IS_ERR_RAISE(ldb_transaction_cancel(PyLdb_AsLdbContext(self)), PyLdb_AsLdbContext(self));
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_ldb_setup_wellknown_attributes(PyLdbObject *self)
{
PyErr_LDB_ERROR_IS_ERR_RAISE(ldb_setup_wellknown_attributes(PyLdb_AsLdbContext(self)), PyLdb_AsLdbContext(self));
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_ldb_repr(PyLdbObject *self)
@@ -428,7 +428,7 @@ static PyObject *py_ldb_get_root_basedn(PyLdbObject *self)
{
struct ldb_dn *dn = ldb_get_root_basedn(PyLdb_AsLdbContext(self));
if (dn == NULL)
- return Py_None;
+ Py_RETURN_NONE;
return PyLdbDn_FromDn(dn);
}
@@ -437,7 +437,7 @@ static PyObject *py_ldb_get_schema_basedn(PyLdbObject *self)
{
struct ldb_dn *dn = ldb_get_schema_basedn(PyLdb_AsLdbContext(self));
if (dn == NULL)
- return Py_None;
+ Py_RETURN_NONE;
return PyLdbDn_FromDn(dn);
}
@@ -446,7 +446,7 @@ static PyObject *py_ldb_get_config_basedn(PyLdbObject *self)
{
struct ldb_dn *dn = ldb_get_config_basedn(PyLdb_AsLdbContext(self));
if (dn == NULL)
- return Py_None;
+ Py_RETURN_NONE;
return PyLdbDn_FromDn(dn);
}
@@ -455,7 +455,7 @@ static PyObject *py_ldb_get_default_basedn(PyLdbObject *self)
{
struct ldb_dn *dn = ldb_get_default_basedn(PyLdb_AsLdbContext(self));
if (dn == NULL)
- return Py_None;
+ Py_RETURN_NONE;
return PyLdbDn_FromDn(dn);
}
@@ -560,7 +560,7 @@ static PyObject *py_ldb_connect(PyLdbObject *self, PyObject *args, PyObject *kwa
PyErr_LDB_ERROR_IS_ERR_RAISE(ret, PyLdb_AsLdbContext(self));
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_ldb_modify(PyLdbObject *self, PyObject *args)
@@ -578,7 +578,7 @@ static PyObject *py_ldb_modify(PyLdbObject *self, PyObject *args)
ret = ldb_modify(PyLdb_AsLdbContext(self), PyLdbMessage_AsMessage(py_msg));
PyErr_LDB_ERROR_IS_ERR_RAISE(ret, PyLdb_AsLdbContext(self));
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_ldb_add(PyLdbObject *self, PyObject *args)
@@ -635,7 +635,7 @@ static PyObject *py_ldb_add(PyLdbObject *self, PyObject *args)
ret = ldb_add(PyLdb_AsLdbContext(self), msg);
PyErr_LDB_ERROR_IS_ERR_RAISE(ret, PyLdb_AsLdbContext(self));
- return Py_None;
+ Py_RETURN_NONE;
}
@@ -657,7 +657,7 @@ static PyObject *py_ldb_delete(PyLdbObject *self, PyObject *args)
ret = ldb_delete(ldb, dn);
PyErr_LDB_ERROR_IS_ERR_RAISE(ret, ldb);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_ldb_rename(PyLdbObject *self, PyObject *args)
@@ -679,7 +679,7 @@ static PyObject *py_ldb_rename(PyLdbObject *self, PyObject *args)
ret = ldb_rename(ldb, dn1, dn2);
PyErr_LDB_ERROR_IS_ERR_RAISE(ret, ldb);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_ldb_schema_attribute_remove(PyLdbObject *self, PyObject *args)
@@ -690,7 +690,7 @@ static PyObject *py_ldb_schema_attribute_remove(PyLdbObject *self, PyObject *arg
ldb_schema_attribute_remove(PyLdb_AsLdbContext(self), name);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_ldb_schema_attribute_add(PyLdbObject *self, PyObject *args)
@@ -705,13 +705,13 @@ static PyObject *py_ldb_schema_attribute_add(PyLdbObject *self, PyObject *args)
PyErr_LDB_ERROR_IS_ERR_RAISE(ret, PyLdb_AsLdbContext(self));
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *ldb_ldif_to_pyobject(struct ldb_ldif *ldif)
{
if (ldif == NULL) {
- return Py_None;
+ Py_RETURN_NONE;
} else {
/* We don't want this attached to the 'ldb' any more */
talloc_steal(NULL, ldif);
@@ -758,12 +758,12 @@ static PyObject *py_ldb_schema_format_value(PyLdbObject *self, PyObject *args)
a = ldb_schema_attribute_by_name(PyLdb_AsLdbContext(self), element_name);
if (a == NULL) {
- return Py_None;
+ Py_RETURN_NONE;
}
if (a->syntax->ldif_write_fn(PyLdb_AsLdbContext(self), mem_ctx, &old_val, &new_val) != 0) {
talloc_free(mem_ctx);
- return Py_None;
+ Py_RETURN_NONE;
}
ret = PyString_FromStringAndSize((const char *)new_val.data, new_val.length);
@@ -862,7 +862,7 @@ static PyObject *py_ldb_get_opaque(PyLdbObject *self, PyObject *args)
data = ldb_get_opaque(PyLdb_AsLdbContext(self), name);
if (data == NULL)
- return Py_None;
+ Py_RETURN_NONE;
/* FIXME: More interpretation */
@@ -881,7 +881,7 @@ static PyObject *py_ldb_set_opaque(PyLdbObject *self, PyObject *args)
ldb_set_opaque(PyLdb_AsLdbContext(self), name, data);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_ldb_modules(PyLdbObject *self)
@@ -1077,19 +1077,19 @@ static PyObject *py_ldb_module_str(PyLdbModuleObject *self)
static PyObject *py_ldb_module_start_transaction(PyLdbModuleObject *self)
{
PyLdbModule_AsModule(self)->ops->start_transaction(PyLdbModule_AsModule(self));
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_ldb_module_end_transaction(PyLdbModuleObject *self)
{
PyLdbModule_AsModule(self)->ops->end_transaction(PyLdbModule_AsModule(self));
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_ldb_module_del_transaction(PyLdbModuleObject *self)
{
PyLdbModule_AsModule(self)->ops->del_transaction(PyLdbModule_AsModule(self));
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_ldb_module_search(PyLdbModuleObject *self, PyObject *args, PyObject *kwargs)
@@ -1138,7 +1138,7 @@ static PyObject *py_ldb_module_add(PyLdbModuleObject *self, PyObject *args)
PyErr_LDB_ERROR_IS_ERR_RAISE(ret, mod->ldb);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_ldb_module_modify(PyLdbModuleObject *self, PyObject *args)
@@ -1160,7 +1160,7 @@ static PyObject *py_ldb_module_modify(PyLdbModuleObject *self, PyObject *args)
PyErr_LDB_ERROR_IS_ERR_RAISE(ret, mod->ldb);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_ldb_module_delete(PyLdbModuleObject *self, PyObject *args)
@@ -1180,7 +1180,7 @@ static PyObject *py_ldb_module_delete(PyLdbModuleObject *self, PyObject *args)
PyErr_LDB_ERROR_IS_ERR_RAISE(ret, NULL);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_ldb_module_rename(PyLdbModuleObject *self, PyObject *args)
@@ -1202,7 +1202,7 @@ static PyObject *py_ldb_module_rename(PyLdbModuleObject *self, PyObject *args)
PyErr_LDB_ERROR_IS_ERR_RAISE(ret, NULL);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyMethodDef py_ldb_module_methods[] = {
@@ -1295,7 +1295,7 @@ static PyObject *py_ldb_msg_element_get(PyLdbMessageElementObject *self, PyObjec
if (!PyArg_ParseTuple(args, "i", &i))
return NULL;
if (i < 0 || i >= PyLdbMessageElement_AsMessageElement(self)->num_values)
- return Py_None;
+ Py_RETURN_NONE;
return PyObject_FromLdbValue(NULL, PyLdbMessageElement_AsMessageElement(self),
&(PyLdbMessageElement_AsMessageElement(self)->values[i]));
@@ -1434,7 +1434,7 @@ static PyObject *py_ldb_msg_element_str(PyLdbMessageElementObject *self)
if (el->num_values == 1)
return PyString_FromStringAndSize((char *)el->values[0].data, el->values[0].length);
else
- return Py_None;
+ Py_RETURN_NONE;
}
static void py_ldb_msg_element_dealloc(PyLdbMessageElementObject *self)
@@ -1465,7 +1465,7 @@ static PyObject *py_ldb_msg_remove_attr(PyLdbMessageObject *self, PyObject *args
ldb_msg_remove_attr(self->msg, name);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_ldb_msg_keys(PyLdbMessageObject *self)
@@ -1516,7 +1516,7 @@ static PyObject *py_ldb_msg_get(PyLdbMessageObject *self, PyObject *args)
ret = py_ldb_msg_getitem_helper(self, name);
if (ret == NULL)
- return Py_None;
+ Py_RETURN_NONE;
return ret;
}
@@ -1980,7 +1980,7 @@ static PyObject *py_register_module(PyObject *module, PyObject *args)
PyErr_LDB_ERROR_IS_ERR_RAISE(ret, NULL);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_timestring(PyObject *module, PyObject *args)
diff --git a/source4/lib/messaging/pymessaging.c b/source4/lib/messaging/pymessaging.c
index 9cc14b4381..4b092e873a 100644
--- a/source4/lib/messaging/pymessaging.c
+++ b/source4/lib/messaging/pymessaging.c
@@ -152,7 +152,7 @@ static PyObject *py_messaging_send(PyObject *self, PyObject *args, PyObject *kwa
return NULL;
}
- return Py_None;
+ Py_RETURN_NONE;
}
static void py_msg_callback_wrapper(struct messaging_context *msg, void *private,
@@ -214,7 +214,7 @@ static PyObject *py_messaging_deregister(PyObject *self, PyObject *args, PyObjec
Py_DECREF(callback);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_messaging_add_name(PyObject *self, PyObject *args, PyObject *kwargs)
@@ -235,7 +235,7 @@ static PyObject *py_messaging_add_name(PyObject *self, PyObject *args, PyObject
return NULL;
}
- return Py_None;
+ Py_RETURN_NONE;
}
@@ -252,7 +252,7 @@ static PyObject *py_messaging_remove_name(PyObject *self, PyObject *args, PyObje
irpc_remove_name(iface->msg_ctx, name);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyMethodDef py_messaging_methods[] = {
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);
}
diff --git a/source4/librpc/ndr/py_security.c b/source4/librpc/ndr/py_security.c
index 5100517c57..73837b67ef 100644
--- a/source4/librpc/ndr/py_security.c
+++ b/source4/librpc/ndr/py_security.c
@@ -100,7 +100,7 @@ static PyObject *py_descriptor_sacl_add(PyObject *self, PyObject *args)
ace = py_talloc_get_ptr(py_ace);
status = security_descriptor_sacl_add(desc, ace);
PyErr_NTSTATUS_IS_ERR_RAISE(status);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_descriptor_dacl_add(PyObject *self, PyObject *args)
@@ -117,7 +117,7 @@ static PyObject *py_descriptor_dacl_add(PyObject *self, PyObject *args)
status = security_descriptor_dacl_add(desc, ace);
PyErr_NTSTATUS_IS_ERR_RAISE(status);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_descriptor_dacl_del(PyObject *self, PyObject *args)
@@ -133,7 +133,7 @@ static PyObject *py_descriptor_dacl_del(PyObject *self, PyObject *args)
sid = py_talloc_get_ptr(py_sid);
status = security_descriptor_dacl_del(desc, sid);
PyErr_NTSTATUS_IS_ERR_RAISE(status);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_descriptor_sacl_del(PyObject *self, PyObject *args)
@@ -149,7 +149,7 @@ static PyObject *py_descriptor_sacl_del(PyObject *self, PyObject *args)
sid = py_talloc_get_ptr(py_sid);
status = security_descriptor_sacl_del(desc, sid);
PyErr_NTSTATUS_IS_ERR_RAISE(status);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_descriptor_new(PyTypeObject *self, PyObject *args, PyObject *kwargs)
@@ -252,7 +252,7 @@ static PyObject *py_token_set_privilege(PyObject *self, PyObject *args)
return NULL;
security_token_set_privilege(token, priv);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_token_new(PyTypeObject *self, PyObject *args, PyObject *kwargs)
diff --git a/source4/librpc/rpc/pyrpc.c b/source4/librpc/rpc/pyrpc.c
index a15c3eaac0..9863a6aeb5 100644
--- a/source4/librpc/rpc/pyrpc.c
+++ b/source4/librpc/rpc/pyrpc.c
@@ -144,7 +144,7 @@ static PyObject *py_iface_server_name(PyObject *obj, void *closure)
server_name = dcerpc_server_name(iface->pipe);
if (server_name == NULL)
- return Py_None;
+ Py_RETURN_NONE;
return PyString_FromString(server_name);
}
@@ -284,7 +284,7 @@ static PyObject *py_iface_alter_context(PyObject *self, PyObject *args, PyObject
return NULL;
}
- return Py_None;
+ Py_RETURN_NONE;
}
PyObject *py_dcerpc_interface_init_helper(PyTypeObject *type, PyObject *args, PyObject *kwargs, const struct ndr_interface_table *table)
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)
diff --git a/source4/scripting/python/pyglue.c b/source4/scripting/python/pyglue.c
index 24ffd58caf..6939979f18 100644
--- a/source4/scripting/python/pyglue.c
+++ b/source4/scripting/python/pyglue.c
@@ -88,7 +88,7 @@ static PyObject *py_ldb_set_credentials(PyObject *self, PyObject *args)
ldb_set_opaque(ldb, "credentials", creds);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_ldb_set_loadparm(PyObject *self, PyObject *args)
@@ -109,7 +109,7 @@ static PyObject *py_ldb_set_loadparm(PyObject *self, PyObject *args)
ldb_set_opaque(ldb, "loadparm", lp_ctx);
- return Py_None;
+ Py_RETURN_NONE;
}
@@ -131,7 +131,7 @@ static PyObject *py_ldb_set_session_info(PyObject *self, PyObject *args)
ldb_set_opaque(ldb, "sessionInfo", info);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_samdb_set_domain_sid(PyLdbObject *self, PyObject *args)
@@ -153,7 +153,7 @@ static PyObject *py_samdb_set_domain_sid(PyLdbObject *self, PyObject *args)
PyErr_SetString(PyExc_RuntimeError, "set_domain_sid failed");
return NULL;
}
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_ldb_register_samba_handlers(PyObject *self, PyObject *args)
@@ -169,7 +169,7 @@ static PyObject *py_ldb_register_samba_handlers(PyObject *self, PyObject *args)
ret = ldb_register_samba_handlers(ldb);
PyErr_LDB_ERROR_IS_ERR_RAISE(ret, ldb);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_dsdb_set_ntds_invocation_id(PyObject *self, PyObject *args)
@@ -189,7 +189,7 @@ static PyObject *py_dsdb_set_ntds_invocation_id(PyObject *self, PyObject *args)
PyErr_SetString(PyExc_RuntimeError, "set_ntds_invocation_id failed");
return NULL;
}
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_dsdb_set_global_schema(PyObject *self, PyObject *args)
@@ -205,7 +205,7 @@ static PyObject *py_dsdb_set_global_schema(PyObject *self, PyObject *args)
ret = dsdb_set_global_schema(ldb);
PyErr_LDB_ERROR_IS_ERR_RAISE(ret, ldb);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_dsdb_attach_schema_from_ldif_file(PyObject *self, PyObject *args)
@@ -223,7 +223,7 @@ static PyObject *py_dsdb_attach_schema_from_ldif_file(PyObject *self, PyObject *
result = dsdb_attach_schema_from_ldif_file(ldb, pf, df);
PyErr_WERROR_IS_ERR_RAISE(result);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyMethodDef py_misc_methods[] = {
diff --git a/source4/web_server/wsgi.c b/source4/web_server/wsgi.c
index 9b660ff362..762de55f69 100644
--- a/source4/web_server/wsgi.c
+++ b/source4/web_server/wsgi.c
@@ -90,7 +90,7 @@ static PyObject *start_response(PyObject *self, PyObject *args, PyObject *kwargs
websrv_output_headers(web, status, headers);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyMethodDef web_request_methods[] = {
@@ -114,7 +114,7 @@ typedef struct {
static PyObject *py_error_flush(PyObject *self, PyObject *args, PyObject *kwargs)
{
/* Nothing to do here */
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_error_write(PyObject *self, PyObject *args, PyObject *kwargs)
@@ -128,7 +128,7 @@ static PyObject *py_error_write(PyObject *self, PyObject *args, PyObject *kwargs
DEBUG(0, ("WSGI App: %s", str));
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *py_error_writelines(PyObject *self, PyObject *args, PyObject *kwargs)
@@ -146,7 +146,7 @@ static PyObject *py_error_writelines(PyObject *self, PyObject *args, PyObject *k
DEBUG(0, ("WSGI App: %s", str));
}
- return Py_None;
+ Py_RETURN_NONE;
}
static PyMethodDef error_Stream_methods[] = {