diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2020-05-15 21:16:14 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2020-05-16 10:26:47 +0200 |
commit | 8bcd2387786f43a1fb5ff00e8e5fff6b36864a91 (patch) | |
tree | 78d66987b26b849efdf8cb5bbe3c93da2ff444c1 | |
parent | cc400539bd85e57fb538e89d1fb223fa88157539 (diff) | |
download | cython-8bcd2387786f43a1fb5ff00e8e5fff6b36864a91.tar.gz |
Sprinkle "unlikely()" branch hints in all places where the memory view C code raises exceptions.
-rw-r--r-- | Cython/Utility/MemoryView_C.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Cython/Utility/MemoryView_C.c b/Cython/Utility/MemoryView_C.c index c12918a00..1b16c8afe 100644 --- a/Cython/Utility/MemoryView_C.c +++ b/Cython/Utility/MemoryView_C.c @@ -517,7 +517,7 @@ static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW({{memviewslice_name}} *memslice, return; } - if (__pyx_get_slice_count(memview) <= 0) + if (unlikely(__pyx_get_slice_count(memview) <= 0)) __pyx_fatalerror("Acquisition count is %d (line %d)", __pyx_get_slice_count(memview), lineno); |