https://github.com/python/cpython/commit/0fc49bed80f346bbd7d82a220a062cd060d95c1a
commit: 0fc49bed80f346bbd7d82a220a062cd060d95c1a
branch: 3.14
author: Miss Islington (bot) <[email protected]>
committer: hugovk <[email protected]>
date: 2025-08-07T18:38:15+03:00
summary:

[3.14] gh-132983: Use ``Py_UNREACHABLE`` in ``_zstd_load_impl()`` (GH-137320) 
(#137360)

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

files:
M Modules/_zstd/decompressor.c

diff --git a/Modules/_zstd/decompressor.c b/Modules/_zstd/decompressor.c
index b00ee05d2f51bf..026d39f68291da 100644
--- a/Modules/_zstd/decompressor.c
+++ b/Modules/_zstd/decompressor.c
@@ -157,10 +157,7 @@ _zstd_load_impl(ZstdDecompressor *self, ZstdDict *zd,
                                        zd->dict_len);
     }
     else {
-        /* Impossible code path */
-        PyErr_SetString(PyExc_SystemError,
-                        "load_d_dict() impossible code path");
-        return -1;
+        Py_UNREACHABLE();
     }
 
     /* Check error */

_______________________________________________
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