summaryrefslogtreecommitdiff
path: root/pyuno/source/module/pyuno_iterator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'pyuno/source/module/pyuno_iterator.cxx')
-rw-r--r--pyuno/source/module/pyuno_iterator.cxx40
1 files changed, 36 insertions, 4 deletions
diff --git a/pyuno/source/module/pyuno_iterator.cxx b/pyuno/source/module/pyuno_iterator.cxx
index 5a36a32d516d..6c1b01c295be 100644
--- a/pyuno/source/module/pyuno_iterator.cxx
+++ b/pyuno/source/module/pyuno_iterator.cxx
@@ -111,7 +111,6 @@ PyObject* PyUNO_iterator_next( PyObject *self )
return nullptr;
}
-
static PyTypeObject PyUNO_iterator_Type =
{
PyVarObject_HEAD_INIT( &PyType_Type, 0 )
@@ -119,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,
@@ -163,6 +166,19 @@ static PyTypeObject PyUNO_iterator_Type =
0
#if PY_VERSION_HEX >= 0x03040000
, nullptr
+#if PY_VERSION_HEX >= 0x03080000
+ , nullptr // vectorcallfunc tp_vectorcall
+#if PY_VERSION_HEX < 0x03090000
+#if defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
+ , nullptr // tp_print
+#if defined __clang__
+#pragma clang diagnostic pop
+#endif
+#endif
+#endif
#endif
};
@@ -241,7 +257,6 @@ PyObject* PyUNO_list_iterator_next( PyObject *self )
return nullptr;
}
-
static PyTypeObject PyUNO_list_iterator_Type =
{
PyVarObject_HEAD_INIT( &PyType_Type, 0 )
@@ -249,7 +264,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 +312,19 @@ static PyTypeObject PyUNO_list_iterator_Type =
0
#if PY_VERSION_HEX >= 0x03040000
, nullptr
+#if PY_VERSION_HEX >= 0x03080000
+ , nullptr // vectorcallfunc tp_vectorcall
+#if PY_VERSION_HEX < 0x03090000
+#if defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
+ , nullptr // tp_print
+#if defined __clang__
+#pragma clang diagnostic pop
+#endif
+#endif
+#endif
#endif
};