Skip to content

Commit

Permalink
[boost] New upstream version 1_86_0. Workaround for Numpy 2.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
wistaria committed Aug 22, 2024
1 parent dc0342c commit f7bbe5e
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tools/boost/patch/boost-1.86.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff -crN boost_1_86_0.orig/libs/python/src/numpy/dtype.cpp boost_1_86_0/libs/python/src/numpy/dtype.cpp
*** boost_1_86_0.orig/libs/python/src/numpy/dtype.cpp Thu Aug 8 07:07:40 2024
--- boost_1_86_0/libs/python/src/numpy/dtype.cpp Thu Aug 22 00:41:23 2024
***************
*** 98,104 ****
return python::detail::new_reference(reinterpret_cast<PyObject*>(obj));
}

! int dtype::get_itemsize() const { return reinterpret_cast<PyArray_Descr*>(ptr())->elsize;}

bool equivalent(dtype const & a, dtype const & b) {
// On Windows x64, the behaviour described on
--- 98,110 ----
return python::detail::new_reference(reinterpret_cast<PyObject*>(obj));
}

! 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

0 comments on commit f7bbe5e

Please sign in to comment.