From 419ae5765ac562982f843adbfff32154e2559162 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Tue, 3 Oct 2017 11:01:18 +0200 Subject: Partially revert c3609f107b16eb888edf284f4637be6cb09234eb Change-Id: I92c84d0d0fba1adcd0adfc93e3fe9b5ea6b8cbf2 Reviewed-on: https://gerrit.libreoffice.org/43065 Reviewed-by: Mike Kaganski Tested-by: Mike Kaganski --- pyuno/source/module/pyuno_util.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pyuno') diff --git a/pyuno/source/module/pyuno_util.cxx b/pyuno/source/module/pyuno_util.cxx index 055ef736695b..e92dad2e8bca 100644 --- a/pyuno/source/module/pyuno_util.cxx +++ b/pyuno/source/module/pyuno_util.cxx @@ -43,7 +43,7 @@ PyRef ustring2PyUnicode( const OUString & str ) ret = PyRef( PyUnicode_FromUnicode( reinterpret_cast(str.getStr()), str.getLength() ), SAL_NO_ACQUIRE ); #else static_assert(sizeof (wchar_t) == Py_UNICODE_SIZE, "bad assumption"); - ret = PyRef( PyUnicode_FromUnicode( SAL_W(str.getStr()), str.getLength() ), SAL_NO_ACQUIRE ); + ret = PyRef( PyUnicode_FromUnicode( reinterpret_cast(str.getStr()), str.getLength() ), SAL_NO_ACQUIRE ); #endif #else OString sUtf8(OUStringToOString(str, RTL_TEXTENCODING_UTF8)); @@ -64,7 +64,8 @@ OUString pyString2ustring( PyObject *pystr ) if( PyUnicode_Check( pystr ) ) { #if Py_UNICODE_SIZE == 2 - ret = SAL_U(PyUnicode_AS_UNICODE( pystr )); + ret = OUString( + reinterpret_cast(PyUnicode_AS_UNICODE( pystr )) ); #else #if PY_MAJOR_VERSION >= 3 Py_ssize_t size(0); -- cgit