* [gentoo-portage-dev] [PATCH] Drop Python 2 comatibility in extension modules
@ 2020-12-24 18:14 Mike Gilbert
2020-12-24 23:07 ` Zac Medico
2020-12-25 0:09 ` Matt Turner
0 siblings, 2 replies; 3+ messages in thread
From: Mike Gilbert @ 2020-12-24 18:14 UTC (permalink / raw
To: gentoo-portage-dev; +Cc: Mike Gilbert
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
---
src/portage_util_file_copy_reflink_linux.c | 10 +---------
src/portage_util_libc.c | 10 +---------
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 *
--
2.30.0.rc1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [gentoo-portage-dev] [PATCH] Drop Python 2 comatibility in extension modules
2020-12-24 18:14 [gentoo-portage-dev] [PATCH] Drop Python 2 comatibility in extension modules Mike Gilbert
@ 2020-12-24 23:07 ` Zac Medico
2020-12-25 0:09 ` Matt Turner
1 sibling, 0 replies; 3+ messages in thread
From: Zac Medico @ 2020-12-24 23:07 UTC (permalink / raw
To: gentoo-portage-dev, Mike Gilbert
[-- Attachment #1.1: Type: text/plain, Size: 332 bytes --]
On 12/24/20 10:14 AM, Mike Gilbert wrote:
> Signed-off-by: Mike Gilbert <floppym@gentoo.org>
> ---
> src/portage_util_file_copy_reflink_linux.c | 10 +---------
> src/portage_util_libc.c | 10 +---------
> 2 files changed, 2 insertions(+), 18 deletions(-)
Looks good. Please merge.
--
Thanks,
Zac
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 981 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-portage-dev] [PATCH] Drop Python 2 comatibility in extension modules
2020-12-24 18:14 [gentoo-portage-dev] [PATCH] Drop Python 2 comatibility in extension modules Mike Gilbert
2020-12-24 23:07 ` Zac Medico
@ 2020-12-25 0:09 ` Matt Turner
1 sibling, 0 replies; 3+ messages in thread
From: Matt Turner @ 2020-12-25 0:09 UTC (permalink / raw
To: gentoo-portage-dev; +Cc: Mike Gilbert
Typo in commit title: comatibility
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-25 0:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-24 18:14 [gentoo-portage-dev] [PATCH] Drop Python 2 comatibility in extension modules Mike Gilbert
2020-12-24 23:07 ` Zac Medico
2020-12-25 0:09 ` Matt Turner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox