summaryrefslogtreecommitdiff
path: root/pyuno
diff options
context:
space:
mode:
Diffstat (limited to 'pyuno')
-rw-r--r--pyuno/source/module/pyuno_util.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyuno/source/module/pyuno_util.cxx b/pyuno/source/module/pyuno_util.cxx
index ecb383222458..30e636ffe2a2 100644
--- a/pyuno/source/module/pyuno_util.cxx
+++ b/pyuno/source/module/pyuno_util.cxx
@@ -48,7 +48,7 @@ PyRef ustring2PyUnicode( const OUString & str )
// Hack to avoid that error
ret = PyRef( PyUnicode_FromUnicode( (const unsigned short *)str.getStr(), str.getLength() ), SAL_NO_ACQUIRE );
#else
- ret = PyRef( PyUnicode_FromUnicode( str.getStr(), str.getLength() ), SAL_NO_ACQUIRE );
+ ret = PyRef( PyUnicode_FromUnicode( SAL_W(str.getStr()), str.getLength() ), SAL_NO_ACQUIRE );
#endif
#else
OString sUtf8(OUStringToOString(str, RTL_TEXTENCODING_UTF8));
@@ -76,7 +76,7 @@ OUString pyString2ustring( PyObject *pystr )
// Hack to avoid that error
ret = OUString( (sal_Unicode *)PyUnicode_AS_UNICODE( pystr ) );
#else
- ret = OUString( PyUnicode_AS_UNICODE( pystr ) );
+ ret = OUString( SAL_U(PyUnicode_AS_UNICODE( pystr )) );
#endif
#else
#if PY_MAJOR_VERSION >= 3