diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-07-26 10:30:48 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-07-26 10:30:48 +0100 |
commit | 96cc0713998c294a9440f03dfa8c4adc9cb71f92 (patch) | |
tree | c51c399e2ac466345931e32f9bb465534a74f828 /dev-python/numpy/files | |
parent | 390bde0d9e0b055c7e87ede2f6b3546ec7da02c7 (diff) |
gentoo auto-resync : 26:07:2023 - 10:30:48
Diffstat (limited to 'dev-python/numpy/files')
-rw-r--r-- | dev-python/numpy/files/numpy-1.25.1-fix-scalartypes.patch | 45 |
1 files changed, 39 insertions, 6 deletions
diff --git a/dev-python/numpy/files/numpy-1.25.1-fix-scalartypes.patch b/dev-python/numpy/files/numpy-1.25.1-fix-scalartypes.patch index 845b41fef23a..aa381d243d88 100644 --- a/dev-python/numpy/files/numpy-1.25.1-fix-scalartypes.patch +++ b/dev-python/numpy/files/numpy-1.25.1-fix-scalartypes.patch @@ -1,8 +1,9 @@ https://bugs.gentoo.org/910739 https://github.com/numpy/numpy/issues/24239 https://github.com/numpy/numpy/pull/24240 +https://github.com/numpy/numpy/commit/d9c0c96582373de0990908c89ed75ae16279e8e5 -From f5eb12cafc99bb33dad6535dacab2f592aafb2b0 Mon Sep 17 00:00:00 2001 +From d9c0c96582373de0990908c89ed75ae16279e8e5 Mon Sep 17 00:00:00 2001 From: Sam James <sam@gentoo.org> Date: Sun, 23 Jul 2023 21:31:08 +0100 Subject: [PATCH] BUG: Fix C types in scalartypes @@ -21,16 +22,48 @@ Closes #24239. Fixes: 81caed6e3c34c4bf4b22b4f6167e816ba2a3f73c --- a/numpy/core/src/multiarray/scalartypes.c.src +++ b/numpy/core/src/multiarray/scalartypes.c.src -@@ -301,10 +301,10 @@ genint_type_str(PyObject *self) - item = PyLong_FromUnsignedLong(*(uint32_t *)val); +@@ -283,34 +283,34 @@ genint_type_str(PyObject *self) + void *val = scalar_value(self, descr); + switch (descr->type_num) { + case NPY_BYTE: +- item = PyLong_FromLong(*(int8_t *)val); ++ item = PyLong_FromLong(*(npy_byte *)val); + break; + case NPY_UBYTE: +- item = PyLong_FromUnsignedLong(*(uint8_t *)val); ++ item = PyLong_FromUnsignedLong(*(npy_ubyte *)val); + break; + case NPY_SHORT: +- item = PyLong_FromLong(*(int16_t *)val); ++ item = PyLong_FromLong(*(npy_short *)val); + break; + case NPY_USHORT: +- item = PyLong_FromUnsignedLong(*(uint16_t *)val); ++ item = PyLong_FromUnsignedLong(*(npy_ushort *)val); + break; + case NPY_INT: +- item = PyLong_FromLong(*(int32_t *)val); ++ item = PyLong_FromLong(*(npy_int *)val); + break; + case NPY_UINT: +- item = PyLong_FromUnsignedLong(*(uint32_t *)val); ++ item = PyLong_FromUnsignedLong(*(npy_uint *)val); break; case NPY_LONG: - item = PyLong_FromLong(*(int64_t *)val); -+ item = PyLong_FromLong(*(long *)val); ++ item = PyLong_FromLong(*(npy_long *)val); break; case NPY_ULONG: - item = PyLong_FromUnsignedLong(*(uint64_t *)val); -+ item = PyLong_FromUnsignedLong(*(unsigned long *)val); ++ item = PyLong_FromUnsignedLong(*(npy_ulong *)val); break; case NPY_LONGLONG: - item = PyLong_FromLongLong(*(long long *)val); +- item = PyLong_FromLongLong(*(long long *)val); ++ item = PyLong_FromLongLong(*(npy_longlong *)val); + break; + case NPY_ULONGLONG: +- item = PyLong_FromUnsignedLongLong(*(unsigned long long *)val); ++ item = PyLong_FromUnsignedLongLong(*(npy_ulonglong *)val); + break; + default: + item = gentype_generic_method(self, NULL, NULL, "item"); |