summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-31 13:31:55 +0200
committerAron Budea <aron.budea@collabora.com>2019-07-20 16:08:23 +0200
commitdecef457728823ee89c1a1ad3afa02c26cebca25 (patch)
treecadca31150a8203844e7e684fd71da9bd7d57ce5
parentf5221894d961cbec0076bf1aac8c0602d3bedf87 (diff)
fix pyuno compile on Fedora29
'PyUnicode_GetSize' is deprecated [-Werror,-Wdeprecated-declarations] Change-Id: Id298d6a2b0af9ce418f9124c9addda55fcdc0318 Reviewed-on: https://gerrit.libreoffice.org/62687 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 485ec8e14306352f44056bcb644bb4cacdb6490a)
-rw-r--r--pyuno/source/module/pyuno_type.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/pyuno/source/module/pyuno_type.cxx b/pyuno/source/module/pyuno_type.cxx
index 3c09e24243b6..fd28d5c2cf9a 100644
--- a/pyuno/source/module/pyuno_type.cxx
+++ b/pyuno/source/module/pyuno_type.cxx
@@ -135,7 +135,11 @@ sal_Unicode PyChar2Unicode( PyObject *obj )
"attribute value of uno.Char is not a unicode string" );
}
+#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 3
+ if( PyUnicode_GetLength( value.get() ) < 1 )
+#else
if( PyUnicode_GetSize( value.get() ) < 1 )
+#endif
{
throw RuntimeException(
"uno.Char contains an empty unicode string");