SHA256
8
0
forked from pool/boost
Files
boost/boost-1.85.0-python-numpy-2.patch
Arvin Schnell 2f51f4d7c9 Accepting request 1272235 from home:aschnell:boost2
- update to 1.88.0
  * new libraries:
    + Hash2 (extensible hashing framework)
    + MQTT5 (MQTT5 client library)
  * for details on all changes see,
    https://www.boost.org/users/history/version_1_88_0.html
- boost-smart-ptr.patch: included upstream
- boost-missing-BOOST_MOVE_STD_NS_BEG.patch: included upstream
- boost-missing-BOOST_MOVE_STD_NS_BEG-again.patch: included upstream

OBS-URL: https://build.opensuse.org/request/show/1272235
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/boost?expand=0&rev=349
2025-04-24 11:55:44 +00:00

27 lines
986 B
Diff

https://bugs.gentoo.org/932459
https://github.com/boostorg/python/issues/431
https://github.com/boostorg/python/pull/432
From 33ac06ca59a68266d3d26edf08205d31ddab4a6c Mon Sep 17 00:00:00 2001
From: Alexis DUBURCQ <alexis.duburcq@gmail.com>
Date: Fri, 15 Mar 2024 14:10:16 +0100
Subject: [PATCH] Support numpy 2.0.0b1
--- a/libs/python/src/numpy/dtype.cpp
+++ b/libs/python/src/numpy/dtype.cpp
@@ -98,7 +98,13 @@ python::detail::new_reference dtype::convert(object const & arg, bool align)
return python::detail::new_reference(reinterpret_cast<PyObject*>(obj));
}
-int dtype::get_itemsize() const { return reinterpret_cast<PyArray_Descr*>(ptr())->elsize;}
+int dtype::get_itemsize() const {
+#if NPY_ABI_VERSION < 0x02000000
+ return reinterpret_cast<PyArray_Descr*>(ptr())->elsize;
+#else
+ return PyDataType_ELSIZE(reinterpret_cast<PyArray_Descr*>(ptr()));
+#endif
+}
bool equivalent(dtype const & a, dtype const & b) {
// On Windows x64, the behaviour described on