https://github.com/python/cpython/commit/2f2bee21118adce653ee5bc4eb31d30327465966
commit: 2f2bee21118adce653ee5bc4eb31d30327465966
branch: main
author: Sam James <s...@gentoo.org>
committer: gpshead <g...@krypto.org>
date: 2025-05-30T04:42:19Z
summary:

gh-134768: Fix definition of `mt_continue_should_break()` (#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.

Fixes: 121ed71f4e395948d313249b2ad33e1e21581f8a

files:
M Modules/_zstd/compressor.c

diff --git a/Modules/_zstd/compressor.c b/Modules/_zstd/compressor.c
index 0fc3d7d36c68fe..8ff2a3aadc1cd6 100644
--- a/Modules/_zstd/compressor.c
+++ b/Modules/_zstd/compressor.c
@@ -512,7 +512,7 @@ compress_lock_held(ZstdCompressor *self, Py_buffer *data,
     return NULL;
 }
 
-#ifdef Py_DEBUG
+#ifndef NDEBUG
 static inline int
 mt_continue_should_break(ZSTD_inBuffer *in, ZSTD_outBuffer *out)
 {

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: arch...@mail-archive.com

Reply via email to