From 69f4d61233c34f3e1dba38b38f39cd02d7bea079 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Thu, 9 Jul 2026 19:08:29 +0300 Subject: [PATCH] gh-153444: Fix compile warning in `Modules/_interpchannelsmodule.c` (GH-153445) (cherry picked from commit 33678dc79f00059aff09ac88f188ef2192031a85) Co-authored-by: sobolevn --- Modules/_interpchannelsmodule.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Modules/_interpchannelsmodule.c b/Modules/_interpchannelsmodule.c index 2c002b7e157069..c5c06656b721e8 100644 --- a/Modules/_interpchannelsmodule.c +++ b/Modules/_interpchannelsmodule.c @@ -2903,7 +2903,8 @@ channelsmod_create(PyObject *self, PyObject *args, PyObject *kwds) int64_t cid = channel_create(&_globals.channels, unboundop); 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);