diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-31 13:31:55 +0200 |
---|---|---|
committer | Aron Budea <aron.budea@collabora.com> | 2019-09-06 15:18:11 +0200 |
commit | 1e65d574410e318eaeec4b6dd0f309d579296d7f (patch) | |
tree | df7775234d9d304816ab39282ea1c86b0e93a47a | |
parent | 629a0173ea46bc9b8115e47a5138b19d07cdf52e (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)
(cherry picked from commit decef457728823ee89c1a1ad3afa02c26cebca25)
-rw-r--r-- | pyuno/source/module/pyuno_type.cxx | 4 |
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"); |