File: 0013-Fix-integer-size-mismatch.patch

package info (click to toggle)
numpy 1%3A2.3.5%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 86,232 kB
  • sloc: python: 255,841; asm: 232,483; ansic: 212,578; cpp: 157,469; f90: 1,575; sh: 845; fortran: 567; makefile: 431; sed: 139; xml: 109; java: 97; perl: 82; cs: 62; javascript: 53; objc: 33; lex: 13; yacc: 9
file content (26 lines) | stat: -rw-r--r-- 1,095 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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..8898843 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("(ccKnn)", descr->kind, nbyteorder,
             descr->flags, descr->elsize, descr->alignment);
 
     for(i = 0; i < PyTuple_Size(t); ++i) {