[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - pyuno/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Fri Jun 12 09:45:03 UTC 2020


 pyuno/source/module/pyuno.cxx          |   14 +++++++-------
 pyuno/source/module/pyuno_callable.cxx |   14 +++++++-------
 pyuno/source/module/pyuno_iterator.cxx |   28 ++++++++++++++--------------
 pyuno/source/module/pyuno_runtime.cxx  |   14 +++++++-------
 pyuno/source/module/pyuno_struct.cxx   |   14 +++++++-------
 5 files changed, 42 insertions(+), 42 deletions(-)

New commits:
commit 9183b9a12c43b350d93fdcacc287513097ba68a1
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon May 11 21:40:17 2020 +0200
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Fri Jun 12 11:44:33 2020 +0200

    More targeted silencing of -Wdeprecated-declarations
    
    ...compared to d1786724b8e8e474e1f7e39012c1f19611841dc0 "prevent warnings in
    pyuno with latest python".  For one it is only the
    
      /* bpo-37250: kept for backwards compatibility in CPython 3.8 only */
      Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
    
    member (in /usr/include/python3.8/cpython/object.h) that causes a warning.  And
    for another it is only Clang that emits a warning when initializing a deprecated
    member that way, <http://lists.llvm.org/pipermail/cfe-dev/2020-May/065392.html>
    "[cfe-dev] Diagnosing initialization of deprecated data member?"
    
    Change-Id: I36625118a6bb26f5468d436da4caa82911181202
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94016
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96195
    Tested-by: Tor Lillqvist <tml at collabora.com>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>

diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx
index cff2d18d5649..63117fc4acdc 100644
--- a/pyuno/source/module/pyuno.cxx
+++ b/pyuno/source/module/pyuno.cxx
@@ -1627,10 +1627,6 @@ 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 )
@@ -1689,14 +1685,18 @@ static PyTypeObject PyUNOType =
 #if PY_VERSION_HEX >= 0x03080000
     , nullptr // vectorcallfunc tp_vectorcall
 #if PY_VERSION_HEX >= 0x03080200
+#if defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
     , nullptr //Py_ssize_t tp_print
+#if defined __clang__
+#pragma clang diagnostic pop
 #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 048bc35a488d..02aa082025ba 100644
--- a/pyuno/source/module/pyuno_callable.cxx
+++ b/pyuno/source/module/pyuno_callable.cxx
@@ -174,10 +174,6 @@ 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,14 +232,18 @@ static PyTypeObject PyUNO_callable_Type =
 #if PY_VERSION_HEX >= 0x03080000
     , nullptr // vectorcallfunc tp_vectorcall
 #if PY_VERSION_HEX >= 0x03080200
+#if defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
     , nullptr //Py_ssize_t tp_print
+#if defined __clang__
+#pragma clang diagnostic pop
 #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 9258b780a304..8337feba9a9d 100644
--- a/pyuno/source/module/pyuno_iterator.cxx
+++ b/pyuno/source/module/pyuno_iterator.cxx
@@ -110,10 +110,6 @@ 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 )
@@ -172,14 +168,18 @@ static PyTypeObject PyUNO_iterator_Type =
 #if PY_VERSION_HEX >= 0x03080000
     , nullptr // vectorcallfunc tp_vectorcall
 #if PY_VERSION_HEX >= 0x03080200
+#if defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
     , nullptr //Py_ssize_t tp_print
+#if defined __clang__
+#pragma clang diagnostic pop
 #endif
 #endif
 #endif
-};
-#ifdef __GNUC__
-#pragma GCC diagnostic pop
 #endif
+};
 
 PyObject* PyUNO_iterator_new( const Reference< XEnumeration >& xEnumeration )
 {
@@ -256,10 +256,6 @@ 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 )
@@ -318,14 +314,18 @@ static PyTypeObject PyUNO_list_iterator_Type =
 #if PY_VERSION_HEX >= 0x03080000
     , nullptr // vectorcallfunc tp_vectorcall
 #if PY_VERSION_HEX >= 0x03080200
+#if defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
     , nullptr //Py_ssize_t tp_print
+#if defined __clang__
+#pragma clang diagnostic pop
 #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 aaa256c8f872..d8b5e71335ad 100644
--- a/pyuno/source/module/pyuno_runtime.cxx
+++ b/pyuno/source/module/pyuno_runtime.cxx
@@ -69,10 +69,6 @@ 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)
@@ -131,14 +127,18 @@ static PyTypeObject RuntimeImpl_Type =
 #if PY_VERSION_HEX >= 0x03080000
     , nullptr // vectorcallfunc tp_vectorcall
 #if PY_VERSION_HEX >= 0x03080200
+#if defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
     , nullptr //Py_ssize_t tp_print
+#if defined __clang__
+#pragma clang diagnostic pop
 #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 8160b2709e18..7abd0545ddf8 100644
--- a/pyuno/source/module/pyuno_struct.cxx
+++ b/pyuno/source/module/pyuno_struct.cxx
@@ -290,10 +290,6 @@ 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 )
@@ -352,14 +348,18 @@ static PyTypeObject PyUNOStructType =
 #if PY_VERSION_HEX >= 0x03080000
     , nullptr // vectorcallfunc tp_vectorcall
 #if PY_VERSION_HEX >= 0x03080200
+#if defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
     , nullptr //Py_ssize_t tp_print
+#if defined __clang__
+#pragma clang diagnostic pop
 #endif
 #endif
 #endif
-};
-#ifdef __GNUC__
-#pragma GCC diagnostic pop
 #endif
+};
 
 int PyUNOStruct_initType()
 {


More information about the Libreoffice-commits mailing list