summaryrefslogtreecommitdiff
path: root/numpy/core/src
diff options
context:
space:
mode:
authorNathan Goldbaum <nathan.goldbaum@gmail.com>2023-03-30 10:54:16 -0600
committerNathan Goldbaum <nathan.goldbaum@gmail.com>2023-03-30 10:54:16 -0600
commit91393597da90c64b68eac592db405fcd20820485 (patch)
tree5dc8584554e042875fc8b366a914a51cce5cdd93 /numpy/core/src
parenta0d872778e9c3d78a877c04d14b333be57732d24 (diff)
downloadnumpy-91393597da90c64b68eac592db405fcd20820485.tar.gz
MAINT: fix compiling on MUSL
Diffstat (limited to 'numpy/core/src')
-rw-r--r--numpy/core/src/multiarray/buffer.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/numpy/core/src/multiarray/buffer.c b/numpy/core/src/multiarray/buffer.c
index 0bee223eb..da4f4e6c9 100644
--- a/numpy/core/src/multiarray/buffer.c
+++ b/numpy/core/src/multiarray/buffer.c
@@ -418,8 +418,7 @@ _buffer_format_string(PyArray_Descr *descr, _tmp_string_t *str,
break;
}
default:
- PyArray_DTypeMeta *DType = NPY_DTYPE(descr);
- if (NPY_DT_is_legacy(DType)) {
+ if (NPY_DT_is_legacy(NPY_DTYPE(descr))) {
PyErr_Format(PyExc_ValueError,
"cannot include dtype '%c' in a buffer",
descr->kind);
@@ -427,7 +426,7 @@ _buffer_format_string(PyArray_Descr *descr, _tmp_string_t *str,
else {
PyErr_Format(PyExc_ValueError,
"cannot include dtype '%s' in a buffer",
- ((PyTypeObject*)DType)->tp_name);
+ ((PyTypeObject*)NPY_DTYPE(descr))->tp_name);
}
return -1;
}