diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2017-10-03 11:01:18 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2017-10-03 11:05:54 +0200 |
commit | 419ae5765ac562982f843adbfff32154e2559162 (patch) | |
tree | 60592e43e05a529e31ee327d4030829cd3f1b14f /pyuno | |
parent | addd1c34502b959e329354d73808c222986d4b74 (diff) |
Partially revert c3609f107b16eb888edf284f4637be6cb09234eb
Change-Id: I92c84d0d0fba1adcd0adfc93e3fe9b5ea6b8cbf2
Reviewed-on: https://gerrit.libreoffice.org/43065
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'pyuno')
-rw-r--r-- | pyuno/source/module/pyuno_util.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
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); |