aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2020-12-24 13:11:22 -0500
committerMike Gilbert <floppym@gentoo.org>2020-12-24 19:26:02 -0500
commitff72973264827cbde7ba642a22e5d0579eeeb57a (patch)
tree3dffafcb99596484e48e524e0ce28ca0c670eac8 /src
parentAdjust mangling of "arch" value from scanelf output (diff)
downloadportage-ff72973264827cbde7ba642a22e5d0579eeeb57a.tar.gz
portage-ff72973264827cbde7ba642a22e5d0579eeeb57a.tar.bz2
portage-ff72973264827cbde7ba642a22e5d0579eeeb57a.zip
Drop Python 2 compatibility in extension modules
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'src')
-rw-r--r--src/portage_util_file_copy_reflink_linux.c10
-rw-r--r--src/portage_util_libc.c10
2 files changed, 2 insertions, 18 deletions
diff --git a/src/portage_util_file_copy_reflink_linux.c b/src/portage_util_file_copy_reflink_linux.c
index 352342c06..c6affe57a 100644
--- a/src/portage_util_file_copy_reflink_linux.c
+++ b/src/portage_util_file_copy_reflink_linux.c
@@ -1,4 +1,4 @@
-/* Copyright 2017 Gentoo Foundation
+/* Copyright 2017-2020 Gentoo Authors
* Distributed under the terms of the GNU General Public License v2
*/
@@ -25,7 +25,6 @@ static PyMethodDef reflink_linuxMethods[] = {
{NULL, NULL, 0, NULL}
};
-#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef moduledef = {
PyModuleDef_HEAD_INIT,
"reflink_linux", /* m_name */
@@ -45,13 +44,6 @@ PyInit_reflink_linux(void)
m = PyModule_Create(&moduledef);
return m;
}
-#else
-PyMODINIT_FUNC
-initreflink_linux(void)
-{
- Py_InitModule("reflink_linux", reflink_linuxMethods);
-}
-#endif
/**
diff --git a/src/portage_util_libc.c b/src/portage_util_libc.c
index 977b95474..2a3e624dc 100644
--- a/src/portage_util_libc.c
+++ b/src/portage_util_libc.c
@@ -1,4 +1,4 @@
-/* Copyright 2005-2016 Gentoo Foundation
+/* Copyright 2005-2020 Gentoo Authors
* Distributed under the terms of the GNU General Public License v2
*/
@@ -15,7 +15,6 @@ static PyMethodDef LibcMethods[] = {
{NULL, NULL, 0, NULL}
};
-#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef moduledef = {
PyModuleDef_HEAD_INIT,
"libc", /* m_name */
@@ -35,13 +34,6 @@ PyInit_libc(void)
m = PyModule_Create(&moduledef);
return m;
}
-#else
-PyMODINIT_FUNC
-initlibc(void)
-{
- Py_InitModule("libc", LibcMethods);
-}
-#endif
static PyObject *