diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-06-07 15:57:13 +0200 |
---|---|---|
committer | Gabor Kelemen <gabor.kelemen.extern@allotropia.de> | 2023-11-09 23:06:08 +0100 |
commit | 0ab8fbc16023df240827f4ab4566d75f0c6796fe (patch) | |
tree | acecf5d46405d082abe25c40184b5ae92f3a367c | |
parent | af6c90ddbbe951adce3f72b2fb352a4e24c0905c (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>
(cherry picked from commit 2bd585f31d7abb066e3f53d9b29c822af20aea69)
Reviewed-on: https://gerrit.libreoffice.org/73778
-rw-r--r-- | pyuno/source/module/pyuno.cxx | 9 | ||||
-rw-r--r-- | pyuno/source/module/pyuno_callable.cxx | 9 | ||||
-rw-r--r-- | pyuno/source/module/pyuno_iterator.cxx | 18 | ||||
-rw-r--r-- | pyuno/source/module/pyuno_runtime.cxx | 9 | ||||
-rw-r--r-- | pyuno/source/module/pyuno_struct.cxx | 9 |
5 files changed, 48 insertions, 6 deletions
diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx index fbe0ccccdf1c..4ae7533941b6 100644 --- a/pyuno/source/module/pyuno.cxx +++ b/pyuno/source/module/pyuno.cxx @@ -1614,7 +1614,11 @@ static PyTypeObject PyUNOType = sizeof (PyUNO), 0, PyUNO_del, - nullptr, +#if PY_VERSION_HEX >= 0x03080000 + 0, // Py_ssize_t tp_vectorcall_offset +#else + nullptr, // printfunc tp_print +#endif PyUNO_getattr, PyUNO_setattr, /* this type does not exist in Python 3: (cmpfunc) */ nullptr, @@ -1660,6 +1664,9 @@ static PyTypeObject PyUNOType = #endif #if PY_VERSION_HEX >= 0x03040000 , nullptr +#if PY_VERSION_HEX >= 0x03080000 + , nullptr // vectorcallfunc tp_vectorcall +#endif #endif }; diff --git a/pyuno/source/module/pyuno_callable.cxx b/pyuno/source/module/pyuno_callable.cxx index b52e8d6b517a..2a1f3b823465 100644 --- a/pyuno/source/module/pyuno_callable.cxx +++ b/pyuno/source/module/pyuno_callable.cxx @@ -182,7 +182,11 @@ static PyTypeObject PyUNO_callable_Type = sizeof (PyUNO_callable), 0, ::pyuno::PyUNO_callable_del, - nullptr, +#if PY_VERSION_HEX >= 0x03080000 + 0, // Py_ssize_t tp_vectorcall_offset +#else + nullptr, // printfunc tp_print +#endif nullptr, nullptr, nullptr, @@ -228,6 +232,9 @@ static PyTypeObject PyUNO_callable_Type = #endif #if PY_VERSION_HEX >= 0x03040000 , nullptr +#if PY_VERSION_HEX >= 0x03080000 + , nullptr // vectorcallfunc tp_vectorcall +#endif #endif }; diff --git a/pyuno/source/module/pyuno_iterator.cxx b/pyuno/source/module/pyuno_iterator.cxx index 5a36a32d516d..2f805fad77f5 100644 --- a/pyuno/source/module/pyuno_iterator.cxx +++ b/pyuno/source/module/pyuno_iterator.cxx @@ -119,7 +119,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, @@ -163,6 +167,9 @@ static PyTypeObject PyUNO_iterator_Type = 0 #if PY_VERSION_HEX >= 0x03040000 , nullptr +#if PY_VERSION_HEX >= 0x03080000 + , nullptr // vectorcallfunc tp_vectorcall +#endif #endif }; @@ -249,7 +256,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, @@ -293,6 +304,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 }; diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx index 39433f6517c9..349583548540 100644 --- a/pyuno/source/module/pyuno_runtime.cxx +++ b/pyuno/source/module/pyuno_runtime.cxx @@ -75,7 +75,11 @@ static PyTypeObject RuntimeImpl_Type = sizeof (RuntimeImpl), 0, RuntimeImpl::del, - nullptr, +#if PY_VERSION_HEX >= 0x03080000 + 0, // Py_ssize_t tp_vectorcall_offset +#else + nullptr, // printfunc tp_print +#endif nullptr, nullptr, nullptr, @@ -121,6 +125,9 @@ static PyTypeObject RuntimeImpl_Type = #endif #if PY_VERSION_HEX >= 0x03040000 , nullptr +#if PY_VERSION_HEX >= 0x03080000 + , nullptr // vectorcallfunc tp_vectorcall +#endif #endif }; diff --git a/pyuno/source/module/pyuno_struct.cxx b/pyuno/source/module/pyuno_struct.cxx index e23b74db20eb..a8de6a199ced 100644 --- a/pyuno/source/module/pyuno_struct.cxx +++ b/pyuno/source/module/pyuno_struct.cxx @@ -299,7 +299,11 @@ static PyTypeObject PyUNOStructType = sizeof (PyUNO), 0, PyUNOStruct_del, - nullptr, +#if PY_VERSION_HEX >= 0x03080000 + 0, // Py_ssize_t tp_vectorcall_offset +#else + nullptr, // printfunc tp_print +#endif PyUNOStruct_getattr, PyUNOStruct_setattr, /* this type does not exist in Python 3: (cmpfunc) */ nullptr, @@ -345,6 +349,9 @@ static PyTypeObject PyUNOStructType = #endif #if PY_VERSION_HEX >= 0x03040000 , nullptr +#if PY_VERSION_HEX >= 0x03080000 + , nullptr // vectorcallfunc tp_vectorcall +#endif #endif }; |