void-packages/srcpkgs/shiboken2/patches/fix-for-numpy-1.23.0.patch

19 lines
672 B
Diff

rework of commit 1422cf4a7f277fb13fd209f24a90d6c02641497d (shiboken6)
--- a/sources/shiboken2/libshiboken/sbknumpyarrayconverter.cpp
+++ b/sources/shiboken2/libshiboken/sbknumpyarrayconverter.cpp
@@ -116,8 +116,13 @@
str << " NPY_ARRAY_NOTSWAPPED";
if ((flags & NPY_ARRAY_WRITEABLE) != 0)
str << " NPY_ARRAY_WRITEABLE";
+#if NPY_VERSION >= 0x00000010 // NPY_1_23_API_VERSION
+ if ((flags & NPY_ARRAY_WRITEBACKIFCOPY) != 0)
+ str << " NPY_ARRAY_WRITEBACKIFCOPY";
+#else
if ((flags & NPY_ARRAY_UPDATEIFCOPY) != 0)
str << " NPY_ARRAY_UPDATEIFCOPY";
+#endif
} else {
str << '0';
}