pyuno/source/module/pyuno_util.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit 419ae5765ac562982f843adbfff32154e2559162 Author: Mike Kaganski <mike.kagan...@collabora.com> Date: Tue Oct 3 11:01:18 2017 +0200 Partially revert c3609f107b16eb888edf284f4637be6cb09234eb Change-Id: I92c84d0d0fba1adcd0adfc93e3fe9b5ea6b8cbf2 Reviewed-on: https://gerrit.libreoffice.org/43065 Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> Tested-by: Mike Kaganski <mike.kagan...@collabora.com> 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<const unsigned short *>(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<wchar_t const *>(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<sal_Unicode const *>(PyUnicode_AS_UNICODE( pystr )) ); #else #if PY_MAJOR_VERSION >= 3 Py_ssize_t size(0); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits