diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-06-07 15:57:13 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-06-10 21:10:56 +0200 |
commit | 2bd585f31d7abb066e3f53d9b29c822af20aea69 (patch) | |
tree | 281c7ada711f6c1ff43ab136c4b6f815d6ceef79 /pyuno/source/module/pyuno_iterator.cxx | |
parent | a7d864668cd9e328b1ec6e2afe8ffa22cbdf0e43 (diff) |
Adapt to upcoming Python 3.8
...which changed PyTypeObject in <https://github.com/python/cpython/commit/
aacc77fbd77640a8f03638216fa09372cc21673d> "bpo-36974: implement PEP 590
(GH-13185)".
Change-Id: I687ec38aeda05d0747b9ed08221db75a758bed51
Reviewed-on: https://gerrit.libreoffice.org/73664
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'pyuno/source/module/pyuno_iterator.cxx')
-rw-r--r-- | pyuno/source/module/pyuno_iterator.cxx | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/pyuno/source/module/pyuno_iterator.cxx b/pyuno/source/module/pyuno_iterator.cxx index 5f643c13b67e..a7862857d719 100644 --- a/pyuno/source/module/pyuno_iterator.cxx +++ b/pyuno/source/module/pyuno_iterator.cxx @@ -118,7 +118,11 @@ static PyTypeObject PyUNO_iterator_Type = sizeof (PyUNO_iterator), 0, PyUNO_iterator_del, - nullptr, +#if PY_VERSION_HEX >= 0x03080000 + 0, // Py_ssize_t tp_vectorcall_offset +#else + nullptr, // printfunc tp_print +#endif nullptr, nullptr, nullptr, @@ -162,6 +166,9 @@ static PyTypeObject PyUNO_iterator_Type = 0 #if PY_VERSION_HEX >= 0x03040000 , nullptr +#if PY_VERSION_HEX >= 0x03080000 + , nullptr // vectorcallfunc tp_vectorcall +#endif #endif }; @@ -248,7 +255,11 @@ static PyTypeObject PyUNO_list_iterator_Type = sizeof (PyUNO_list_iterator), 0, PyUNO_list_iterator_del, - nullptr, +#if PY_VERSION_HEX >= 0x03080000 + 0, // Py_ssize_t tp_vectorcall_offset +#else + nullptr, // printfunc tp_print +#endif nullptr, nullptr, nullptr, @@ -292,6 +303,9 @@ static PyTypeObject PyUNO_list_iterator_Type = 0 #if PY_VERSION_HEX >= 0x03040000 , nullptr +#if PY_VERSION_HEX >= 0x03080000 + , nullptr // vectorcallfunc tp_vectorcall +#endif #endif }; |