From 7dd5042f4c4611578a6eb9b605d9aa4bd8d5e7f9 Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Thu, 20 Sep 2007 14:57:41 +0000 Subject: INTEGRATION: CWS os2port01 (1.7.20); FILE MERGED 2006/12/28 15:02:20 ydario 1.7.20.1: OS/2 initial import. --- pyuno/source/module/pyuno_util.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'pyuno/source') diff --git a/pyuno/source/module/pyuno_util.cxx b/pyuno/source/module/pyuno_util.cxx index baafad996609..6b08ff9b1c42 100644 --- a/pyuno/source/module/pyuno_util.cxx +++ b/pyuno/source/module/pyuno_util.cxx @@ -4,9 +4,9 @@ * * $RCSfile: pyuno_util.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: kz $ $Date: 2006-07-19 16:42:39 $ + * last change: $Author: vg $ $Date: 2007-09-20 15:57:41 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -74,7 +74,8 @@ PyRef ustring2PyUnicode( const OUString & str ) { PyRef ret; #if Py_UNICODE_SIZE == 2 - ret = PyRef( PyUnicode_FromUnicode( str.getStr(), str.getLength() ), SAL_NO_ACQUIRE ); + // YD force conversion since python/2 uses wchar_t + ret = PyRef( PyUnicode_FromUnicode( (const Py_UNICODE*)str.getStr(), str.getLength() ), SAL_NO_ACQUIRE ); #else OString sUtf8(OUStringToOString(str, RTL_TEXTENCODING_UTF8)); ret = PyRef( PyUnicode_DecodeUTF8( sUtf8.getStr(), sUtf8.getLength(), NULL) , SAL_NO_ACQUIRE ); -- cgit