summaryrefslogtreecommitdiff
path: root/Cython/Utility
diff options
context:
space:
mode:
authorJeppe Dakin <jeppe_dakin@hotmail.com>2020-10-08 07:07:08 +0200
committerStefan Behnel <stefan_ml@behnel.de>2020-10-08 07:08:05 +0200
commit270044f86a56f57a719ab4b36f5ce8a5caefdf1c (patch)
tree894d2f4acf064bd8232fcd05ed4dc9da1853cf7e /Cython/Utility
parentb2b759ff714bd350e87faaf25c13f7dab459856f (diff)
downloadcython-270044f86a56f57a719ab4b36f5ce8a5caefdf1c.tar.gz
Split a combined assert in two to avoid an unused C temp variable when assertions are disabled. (GH-3870)
Diffstat (limited to 'Cython/Utility')
-rw-r--r--Cython/Utility/MemoryView.pyx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Cython/Utility/MemoryView.pyx b/Cython/Utility/MemoryView.pyx
index 3c92d5db9..6ca5fab9b 100644
--- a/Cython/Utility/MemoryView.pyx
+++ b/Cython/Utility/MemoryView.pyx
@@ -1466,7 +1466,8 @@ cdef bytes format_from_typeinfo(__Pyx_TypeInfo *type):
cdef bytes part, result
if type.typegroup == 'S':
- assert type.fields != NULL and type.fields.type != NULL
+ assert type.fields != NULL
+ assert type.fields.type != NULL
if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT:
alignment = b'^'