https://github.com/python/cpython/commit/d96343679fd6137c9d87d1bb120228b162ea0f8c
commit: d96343679fd6137c9d87d1bb120228b162ea0f8c
branch: main
author: Collin Funk <[email protected]>
committer: vstinner <[email protected]>
date: 2025-05-29T19:35:53+02:00
summary:
gh-134771: Fix time_clockid_converter() on Cygwin (#134772)
Use long for clockid_t instead of int.
files:
A Misc/NEWS.d/next/Library/2025-05-26-22-18-32.gh-issue-134771.RKXpLT.rst
M Modules/timemodule.c
diff --git
a/Misc/NEWS.d/next/Library/2025-05-26-22-18-32.gh-issue-134771.RKXpLT.rst
b/Misc/NEWS.d/next/Library/2025-05-26-22-18-32.gh-issue-134771.RKXpLT.rst
new file mode 100644
index 00000000000000..4b70c6ef398793
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2025-05-26-22-18-32.gh-issue-134771.RKXpLT.rst
@@ -0,0 +1,2 @@
+The ``time_clockid_converter()`` function now selects correct type for
+``clockid_t`` on Cygwin which fixes a build error.
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
index 1bfbf3f6a0b991..3271d87ddc27f2 100644
--- a/Modules/timemodule.c
+++ b/Modules/timemodule.c
@@ -187,7 +187,7 @@ time_clockid_converter(PyObject *obj, clockid_t *p)
{
#ifdef _AIX
long long clk_id = PyLong_AsLongLong(obj);
-#elif defined(__DragonFly__)
+#elif defined(__DragonFly__) || defined(__CYGWIN__)
long clk_id = PyLong_AsLong(obj);
#else
int clk_id = PyLong_AsInt(obj);
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]