]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-134768: Fix definition of `mt_continue_should_break()` (GH-134769) (#134916)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 30 May 2025 05:08:43 +0000 (07:08 +0200)
committerGitHub <noreply@github.com>
Fri, 30 May 2025 05:08:43 +0000 (05:08 +0000)
gh-134768: Fix definition of `mt_continue_should_break()` (GH-134769)

In 121ed71f4e395948d313249b2ad33e1e21581f8a, mt_continue_should_break
was changed to be guarded by `Py_DEBUG`, but it's used in `compress_mt_continue_lock_held`
with just `assert`, so it needs to be available when `NDEBUG` is undefined
too.

`Py_DEBUG` implies `NDEBUG` is undefined, so we can check just that.
(cherry picked from commit 2f2bee21118adce653ee5bc4eb31d30327465966)

Fixes: 121ed71f4e395948d313249b2ad33e1e21581f8a
Co-authored-by: Sam James <sam@gentoo.org>
Modules/_zstd/compressor.c

index 0fc3d7d36c68fee67f25552854b9c7f5fa137cf6..8ff2a3aadc1cd6b414ca8b0ef49b1ce8dd3a9b4e 100644 (file)
@@ -512,7 +512,7 @@ error:
     return NULL;
 }
 
-#ifdef Py_DEBUG
+#ifndef NDEBUG
 static inline int
 mt_continue_should_break(ZSTD_inBuffer *in, ZSTD_outBuffer *out)
 {