diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-06 18:43:30 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-07 08:43:14 +0200 |
commit | d1786724b8e8e474e1f7e39012c1f19611841dc0 (patch) | |
tree | 22899b972174beb4cab05a3249099aaa97867de0 /pyuno | |
parent | 4021fedf758b8c4c439387c61223acd78630cedc (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>
Diffstat (limited to 'pyuno')
-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 | 20 | ||||
-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, 8 deletions
diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx index bdd717cc397e..1b875b6891d0 100644 --- a/pyuno/source/module/pyuno.cxx +++ b/pyuno/source/module/pyuno.cxx @@ -1603,6 +1603,10 @@ static PyMappingMethods PyUNOMappingMethods[] = PyUNO_setitem, /* mp_ass_subscript */ }; +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif static PyTypeObject PyUNOType = { PyVarObject_HEAD_INIT( &PyType_Type, 0 ) @@ -1661,11 +1665,14 @@ static PyTypeObject PyUNOType = #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 PyUNO_initType() { diff --git a/pyuno/source/module/pyuno_callable.cxx b/pyuno/source/module/pyuno_callable.cxx index 4803a30f814d..548c2bcef7dc 100644 --- a/pyuno/source/module/pyuno_callable.cxx +++ b/pyuno/source/module/pyuno_callable.cxx @@ -178,6 +178,10 @@ static PyObject* PyUNO_callable_call( } +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif static PyTypeObject PyUNO_callable_Type = { PyVarObject_HEAD_INIT( &PyType_Type, 0 ) @@ -236,11 +240,14 @@ static PyTypeObject PyUNO_callable_Type = #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 PyRef PyUNO_callable_new ( const Reference<XInvocation2> &my_inv, diff --git a/pyuno/source/module/pyuno_iterator.cxx b/pyuno/source/module/pyuno_iterator.cxx index 6ba7f96a9632..9258b780a304 100644 --- a/pyuno/source/module/pyuno_iterator.cxx +++ b/pyuno/source/module/pyuno_iterator.cxx @@ -110,7 +110,10 @@ static PyObject* PyUNO_iterator_next( PyObject *self ) return nullptr; } - +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif static PyTypeObject PyUNO_iterator_Type = { PyVarObject_HEAD_INIT( &PyType_Type, 0 ) @@ -169,11 +172,14 @@ static PyTypeObject PyUNO_iterator_Type = #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 PyObject* PyUNO_iterator_new( const Reference< XEnumeration >& xEnumeration ) { @@ -250,7 +256,10 @@ static PyObject* PyUNO_list_iterator_next( PyObject *self ) return nullptr; } - +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif static PyTypeObject PyUNO_list_iterator_Type = { PyVarObject_HEAD_INIT( &PyType_Type, 0 ) @@ -309,11 +318,14 @@ static PyTypeObject PyUNO_list_iterator_Type = #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 PyObject* PyUNO_list_iterator_new( const Reference<XIndexAccess> &xIndexAccess ) { diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx index ce7f36272f4b..a082907a1fac 100644 --- a/pyuno/source/module/pyuno_runtime.cxx +++ b/pyuno/source/module/pyuno_runtime.cxx @@ -70,6 +70,10 @@ using com::sun::star::beans::theIntrospection; namespace pyuno { +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif static PyTypeObject RuntimeImpl_Type = { PyVarObject_HEAD_INIT (&PyType_Type, 0) @@ -128,11 +132,14 @@ static PyTypeObject RuntimeImpl_Type = #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 /*---------------------------------------------------------------------- Runtime implementation diff --git a/pyuno/source/module/pyuno_struct.cxx b/pyuno/source/module/pyuno_struct.cxx index c816e1351c8c..27b24b1659ec 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() { |