https://github.com/python/cpython/commit/b7e6f9bb85582e08e4610d4bc86b0c74d664a8d9
commit: b7e6f9bb85582e08e4610d4bc86b0c74d664a8d9
branch: 3.15
author: Miss Islington (bot) <[email protected]>
committer: sobolevn <[email protected]>
date: 2026-07-10T11:37:10Z
summary:

[3.15] gh-153444: Fix compile warning in `Modules/_interpchannelsmodule.c` 
(GH-153445) (#153447)

gh-153444: Fix compile warning in `Modules/_interpchannelsmodule.c` (GH-153445)
(cherry picked from commit 33678dc79f00059aff09ac88f188ef2192031a85)

Co-authored-by: sobolevn <[email protected]>

files:
M Modules/_interpchannelsmodule.c

diff --git a/Modules/_interpchannelsmodule.c b/Modules/_interpchannelsmodule.c
index 358d51cf13f1af..7b31b1f0c85d26 100644
--- a/Modules/_interpchannelsmodule.c
+++ b/Modules/_interpchannelsmodule.c
@@ -2935,7 +2935,8 @@ channelsmod_create(PyObject *self, PyObject *args, 
PyObject *kwds)
 
     int64_t cid = channel_create(&_globals.channels, defaults);
     if (cid < 0) {
-        (void)handle_channel_error(cid, self, cid);
+        // Negative `cid` can't be too big for a downcast:
+        (void)handle_channel_error((int)cid, self, cid);
         return NULL;
     }
     module_state *state = get_module_state(self);

_______________________________________________
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]

Reply via email to