diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-06-23 10:44:01 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-06-27 15:34:16 +0200 |
commit | be3833f3873133d4ddec7eee7742190bb4ffacbf (patch) | |
tree | 2a30a89f56c5d7f00b781c3234bc2c7133e4f7e8 | |
parent | 5e17aaa3a4fbb4dfaba79fa7ee004dc499cf0add (diff) |
libshiboken: Fix build with numpy 1.23.0
Change-Id: I885c332d6c948820140946c73ae1926e88834143
Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit 1422cf4a7f277fb13fd209f24a90d6c02641497d)
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
-rw-r--r-- | sources/shiboken2/libshiboken/sbknumpyarrayconverter.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sources/shiboken2/libshiboken/sbknumpyarrayconverter.cpp b/sources/shiboken2/libshiboken/sbknumpyarrayconverter.cpp index 3f1695a18..722768e2e 100644 --- a/sources/shiboken2/libshiboken/sbknumpyarrayconverter.cpp +++ b/sources/shiboken2/libshiboken/sbknumpyarrayconverter.cpp @@ -98,8 +98,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'; } |