Update of /cvsroot/wpdev/wolfpack/python
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9345/python
Modified Files:
char.cpp item.cpp socket.cpp utilities.h
Log Message:
UCS4 fixes
Index: item.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/item.cpp,v
retrieving revision 1.134
retrieving revision 1.135
diff -C2 -d -r1.134 -r1.135
*** item.cpp 27 Sep 2004 22:26:24 -0000 1.134
--- item.cpp 30 Sep 2004 19:58:52 -0000 1.135
***************
*** 396,400 ****
if ( value.type() == cVariant::String )
! return PyUnicode_FromUnicode( ( Py_UNICODE * ) value.toString().ucs2(), value.toString().length() );
else if ( value.type() == cVariant::Int )
return PyInt_FromLong( value.asInt() );
--- 396,400 ----
if ( value.type() == cVariant::String )
! return QString2Python(value.toString());
else if ( value.type() == cVariant::Int )
return PyInt_FromLong( value.asInt() );
Index: socket.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/socket.cpp,v
retrieving revision 1.86
retrieving revision 1.87
diff -C2 -d -r1.86 -r1.87
*** socket.cpp 19 Sep 2004 22:13:36 -0000 1.86
--- socket.cpp 30 Sep 2004 19:58:52 -0000 1.87
***************
*** 686,690 ****
if ( value.type() == cVariant::String )
! return PyUnicode_FromUnicode( ( Py_UNICODE * ) value.toString().ucs2(), value.toString().length() );
else if ( value.type() == cVariant::Int )
return PyInt_FromLong( value.asInt() );
--- 686,690 ----
if ( value.type() == cVariant::String )
! return QString2Python(value.toString());
else if ( value.type() == cVariant::Int )
return PyInt_FromLong( value.asInt() );
Index: utilities.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/utilities.h,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** utilities.h 10 Sep 2004 04:10:37 -0000 1.45
--- utilities.h 30 Sep 2004 19:58:52 -0000 1.46
***************
*** 141,145 ****
--- 141,151 ----
else
{
+ #if defined(Py_UNICODE_WIDE)
+ QCString utf = string.utf8();
+ PyObject *obj = PyUnicode_DecodeUTF8( utf.data(), utf.length(), "" );
+ return obj;
+ #else
return PyUnicode_FromUnicode( ( Py_UNICODE * ) string.ucs2(), string.length() );
+ #endif
}
}
Index: char.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/char.cpp,v
retrieving revision 1.200
retrieving revision 1.201
diff -C2 -d -r1.200 -r1.201
*** char.cpp 27 Sep 2004 22:48:38 -0000 1.200
--- char.cpp 30 Sep 2004 19:58:52 -0000 1.201
***************
*** 969,973 ****
if ( value.type() == cVariant::String )
! return PyUnicode_FromUnicode( ( Py_UNICODE * ) value.toString().ucs2(), value.toString().length() );
else if ( value.type() == cVariant::Int )
return PyInt_FromLong( value.asInt() );
--- 969,973 ----
if ( value.type() == cVariant::String )
! return QString2Python(value.toString());
else if ( value.type() == cVariant::Int )
return PyInt_FromLong( value.asInt() );
|