From 9ac98e6e3488e434bf4864ecfb13a121784f640b Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 4 Apr 2017 14:57:45 +0200 Subject: Finally switch MSVC to sal_Unicode = char16_t, too There is lots of (Windows-only) code that relied on sal_Unicode being the same as wchar_t, and the best change may be different in each case (and doing the changes may be somewhat error prone). So for now add SAL_U/SAL_W scaffolding functions to sal/types.h, remove their uses one by one again, and finally drop those functions again. Change-Id: I2cc791bd941d089901abb5f6fc2f05fbc49e65ea Reviewed-on: https://gerrit.libreoffice.org/36077 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- pyuno/source/module/pyuno_util.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pyuno') 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 -- cgit