summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/Python/import.c b/Python/import.c
index aef1800..38976f6 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -260,8 +260,7 @@ _imp_acquire_lock_impl(PyObject *module)
#ifdef WITH_THREAD
_PyImport_AcquireLock();
#endif
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
/*[clinic input]
@@ -283,8 +282,7 @@ _imp_release_lock_impl(PyObject *module)
return NULL;
}
#endif
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
void
@@ -1853,8 +1851,7 @@ _imp_init_frozen_impl(PyObject *module, PyObject *name)
if (ret < 0)
return NULL;
if (ret == 0) {
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
m = PyImport_AddModuleObject(name);
Py_XINCREF(m);