diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-06 18:43:30 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2020-06-12 11:44:03 +0200 |
commit | 31d45cf1089c76a33c995af19f59e8e15fe84de3 (patch) | |
tree | 803f912ea979d53237a2bdeb9d5bc1981dba7da0 | |
parent | e99caca4301fc829ae31b02a51202ad046ee9a37 (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>
-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 bf6e5c667b7c..cff2d18d5649 100644 --- a/pyuno/source/module/pyuno.cxx +++ b/pyuno/source/module/pyuno.cxx @@ -1627,6 +1627,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 ) @@ -1685,11 +1689,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 61c5a15155c6..048bc35a488d 100644 --- a/pyuno/source/module/pyuno_callable.cxx +++ b/pyuno/source/module/pyuno_callable.cxx @@ -174,6 +174,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 ) @@ -232,11 +236,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 72dd9e2964eb..aaa256c8f872 100644 --- a/pyuno/source/module/pyuno_runtime.cxx +++ b/pyuno/source/module/pyuno_runtime.cxx @@ -69,6 +69,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) @@ -127,11 +131,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 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() { |