diff options
Diffstat (limited to 'contrib/python')
| -rw-r--r-- | contrib/python/multidict/multidict/_multilib/hashtable.h | 4 | ||||
| -rwxr-xr-x | contrib/python/multidict/patches/02-disable-ndebug.sh | 20 |
2 files changed, 22 insertions, 2 deletions
diff --git a/contrib/python/multidict/multidict/_multilib/hashtable.h b/contrib/python/multidict/multidict/_multilib/hashtable.h index ece41c43fa8..1a7e46e3557 100644 --- a/contrib/python/multidict/multidict/_multilib/hashtable.h +++ b/contrib/python/multidict/multidict/_multilib/hashtable.h @@ -86,7 +86,7 @@ GROWTH_RATE(MultiDictObject *md) return md->used * 3; } -#ifndef NDEBUG +#if 0 static inline int _md_check_consistency(MultiDictObject *md, bool update); static inline int @@ -1901,7 +1901,7 @@ md_clear(MultiDictObject *md) return 0; } -#ifndef NDEBUG +#if 0 static inline int _md_check_consistency(MultiDictObject *md, bool update) diff --git a/contrib/python/multidict/patches/02-disable-ndebug.sh b/contrib/python/multidict/patches/02-disable-ndebug.sh new file mode 100755 index 00000000000..6b0c0d203d9 --- /dev/null +++ b/contrib/python/multidict/patches/02-disable-ndebug.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# Disable the _md_check_consistency debug helpers in hashtable.h. +# +# Upstream gates these blocks behind `#ifndef NDEBUG`. Under the Arcadia build +# NDEBUG is not always defined, so the asserts compile in and break the build. +# Replacing the guard with `#if 0` keeps the blocks permanently disabled. +# +# Both `#ifndef NDEBUG` occurrences in this header guard the same helper, so an +# unconditional replacement is safe. +# See NOCDEV-18704, DEVTOOLSSUPPORT-88661, NOCDEVDUTY-5981 +set -e + +# macOS ships BSD sed (incompatible `-i` syntax); use GNU sed (gsed) there. +if [ "$(uname)" = "Darwin" ]; then + SED=gsed +else + SED=sed +fi + +"$SED" -i 's/^#ifndef NDEBUG$/#if 0/' multidict/_multilib/hashtable.h |
