-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[boost] Workaround for Apple Silicon
- Loading branch information
Showing
1 changed file
with
32 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,32 @@ | ||
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 | ||
diff -urN boost-1.86.0.orig/libs/charconv/src/to_chars_float_impl.hpp boost-1.86.0/libs/charconv/src/to_chars_float_impl.hpp | ||
--- boost-1.86.0.orig/libs/charconv/src/to_chars_float_impl.hpp 2024-08-08 07:07:34 | ||
+++ boost-1.86.0/libs/charconv/src/to_chars_float_impl.hpp 2024-08-22 10:23:38 | ||
@@ -273,9 +273,7 @@ | ||
|
||
typename std::conditional<std::is_same<Real, float>::value, ieee754_binary32, | ||
typename std::conditional<std::is_same<Real, double>::value, ieee754_binary64, | ||
- #ifdef BOOST_CHARCONV_HAS_FLOAT128 | ||
- typename std::conditional<std::is_same<Real, __float128>::value || BOOST_CHARCONV_LDBL_BITS == 128, ieee754_binary128, ieee754_binary80>::type | ||
- #elif BOOST_CHARCONV_LDBL_BITS == 128 | ||
+ #if BOOST_CHARCONV_LDBL_BITS == 128 | ||
ieee754_binary128 | ||
#elif BOOST_CHARCONV_LDBL_BITS == 80 | ||
ieee754_binary80 | ||
diff -urN 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 2024-08-08 07:07:40 | ||
+++ boost-1.86.0/libs/python/src/numpy/dtype.cpp 2024-08-22 10:20:27 | ||
@@ -98,7 +98,13 @@ | ||
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 |