summaryrefslogtreecommitdiff
path: root/pyuno/source/module/pyuno_struct.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-05-06 18:43:30 +0200
committerTor Lillqvist <tml@collabora.com>2020-06-12 11:44:03 +0200
commit31d45cf1089c76a33c995af19f59e8e15fe84de3 (patch)
tree803f912ea979d53237a2bdeb9d5bc1981dba7da0 /pyuno/source/module/pyuno_struct.cxx
parente99caca4301fc829ae31b02a51202ad046ee9a37 (diff)
prevent warnings in pyuno with latest python
which has marked some members deprecated, but we can't stop initialising them or we run the risk of ASAN complaining Change-Id: I8f4ad0ae083fad9c040613ddde7c40f20d68c7d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93580 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96194 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'pyuno/source/module/pyuno_struct.cxx')
-rw-r--r--pyuno/source/module/pyuno_struct.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/pyuno/source/module/pyuno_struct.cxx b/pyuno/source/module/pyuno_struct.cxx
index 56b71cdf5cc4..8160b2709e18 100644
--- a/pyuno/source/module/pyuno_struct.cxx
+++ b/pyuno/source/module/pyuno_struct.cxx
@@ -290,6 +290,10 @@ static PyMethodDef PyUNOStructMethods[] =
{nullptr, nullptr, 0, nullptr}
};
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
static PyTypeObject PyUNOStructType =
{
PyVarObject_HEAD_INIT( &PyType_Type, 0 )
@@ -348,11 +352,14 @@ static PyTypeObject PyUNOStructType =
#if PY_VERSION_HEX >= 0x03080000
, nullptr // vectorcallfunc tp_vectorcall
#if PY_VERSION_HEX >= 0x03080200
- , 0 //Py_ssize_t tp_print
+ , nullptr //Py_ssize_t tp_print
#endif
#endif
#endif
};
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
int PyUNOStruct_initType()
{