Группа :: Development/Python3
Пакет: python3-module-PySide2
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: pyside2-fix-build-with-numpy1.23.0.patch
Скачать
Скачать
From: Friedemann Kleint <Friedemann.Kleint@qt.io>
Date: Thu, 23 Jun 2022 08:44:01 +0000 (+0200)
Subject: libshiboken: Fix build with numpy 1.23.0
X-Git-Tag: v6.4.0~241
X-Git-Url: https://codereview.qt-project.org/gitweb?p=pyside%2Fpyside-setup.git;a=commitdiff_plain;h=1422cf4a7f277fb13fd209f24a90d6c02641497d;hp=99d76b5e4e2397fcb4ddf45de91748ab1861f755
libshiboken: Fix build with numpy 1.23.0
Pick-to: 6.3 6.2 5.15
Change-Id: I885c332d6c948820140946c73ae1926e88834143
Reviewed-by: Christian Tismer <tismer@stackless.com>
---
diff --git a/sources/shiboken6/libshiboken/sbknumpyarrayconverter.cpp b/sources/shiboken6/libshiboken/sbknumpyarrayconverter.cpp
index 3048ffba64..c8541adf5c 100644
--- a/sources/shiboken2/libshiboken/sbknumpyarrayconverter.cpp
+++ b/sources/shiboken2/libshiboken/sbknumpyarrayconverter.cpp
@@ -80,8 +80,13 @@ std::ostream &operator<<(std::ostream &str, PyArrayObject *o)
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';
}