diff options
Diffstat (limited to 'pyuno')
-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 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"); |