From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
Date: Thu, 20 Nov 2025 09:38:49 +0100
Subject: Fix integer size mismatch

As usual, this seemingly works on little endian but will cause misalignments on big endian

Bug-Debian: https://bugs.debian.org/1120971
Bug: https://github.com/numpy/numpy/issues/30257#issuecomment-3552193179
Forwarded: yes
---
 numpy/_core/src/multiarray/hashdescr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/numpy/_core/src/multiarray/hashdescr.c b/numpy/_core/src/multiarray/hashdescr.c
index f570caf..09d8ff3 100644
--- a/numpy/_core/src/multiarray/hashdescr.c
+++ b/numpy/_core/src/multiarray/hashdescr.c
@@ -78,7 +78,7 @@ static int _array_descr_builtin(PyArray_Descr* descr, PyObject *l)
      * For builtin type, hash relies on : kind + byteorder + flags +
      * type_num + elsize + alignment
      */
-    t = Py_BuildValue("(cccii)", descr->kind, nbyteorder,
+    t = Py_BuildValue("(cccnn)", descr->kind, nbyteorder,
             descr->flags, descr->elsize, descr->alignment);
 
     for(i = 0; i < PyTuple_Size(t); ++i) {
