summaryrefslogtreecommitdiff
path: root/pyuno
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2007-09-20 14:57:41 +0000
committerVladimir Glazounov <vg@openoffice.org>2007-09-20 14:57:41 +0000
commit7dd5042f4c4611578a6eb9b605d9aa4bd8d5e7f9 (patch)
tree66ef62367dc94de6d621127ddb0f3962b5baa430 /pyuno
parent14244312dfec82c306fd1fb2932bc3662ce5a947 (diff)
INTEGRATION: CWS os2port01 (1.7.20); FILE MERGED
2006/12/28 15:02:20 ydario 1.7.20.1: OS/2 initial import.
Diffstat (limited to 'pyuno')
-rw-r--r--pyuno/source/module/pyuno_util.cxx7
1 files changed, 4 insertions, 3 deletions
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 );