summaryrefslogtreecommitdiff
path: root/pyuno
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-31 13:31:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-01 06:43:41 +0100
commit485ec8e14306352f44056bcb644bb4cacdb6490a (patch)
treef7fae6fe78a8136a3dff92d1ada74225fc53306f /pyuno
parentd4e96a36d78299794ff4ac86e937fbbb0843c6ed (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>
Diffstat (limited to 'pyuno')
-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 80505d85bbd1..fc6385e2be1b 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");