]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-153444: Fix compile warning in `Modules/_interpchannelsmodule.c` (#153445)
authorsobolevn <mail@sobolevn.me>
Thu, 9 Jul 2026 16:08:29 +0000 (19:08 +0300)
committerGitHub <noreply@github.com>
Thu, 9 Jul 2026 16:08:29 +0000 (19:08 +0300)
Modules/_interpchannelsmodule.c

index 358d51cf13f1afae16592313ba877ee2f60091b1..7b31b1f0c85d26476bdb4ae3be72bf55873b1b31 100644 (file)
@@ -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);