Skip to content

Commit 2f2bee2

Browse files
authored
gh-134768: Fix definition of mt_continue_should_break() (#134769)
In 121ed71, 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: 121ed71
1 parent 5f60d0f commit 2f2bee2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/_zstd/compressor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ compress_lock_held(ZstdCompressor *self, Py_buffer *data,
512512
return NULL;
513513
}
514514

515-
#ifdef Py_DEBUG
515+
#ifndef NDEBUG
516516
static inline int
517517
mt_continue_should_break(ZSTD_inBuffer *in, ZSTD_outBuffer *out)
518518
{

0 commit comments

Comments
 (0)