Update of /cvsroot/wpdev/wolfpack/python
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23996/python
Modified Files:
gump.h socket.cpp target.h tempeffect.h utilities.h
Log Message:
should now be possible to use UCS4 python
Index: gump.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/gump.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** gump.h 19 Aug 2004 01:59:16 -0000 1.23
--- gump.h 19 Aug 2004 05:28:21 -0000 1.24
***************
*** 143,147 ****
{
// Find the last dot
! Q_INT32 position = callback.findRev( "." );
QString sModule = callback.left( position );
QString sFunction = callback.right( callback.length() - ( position + 1 ) );
--- 143,147 ----
{
// Find the last dot
! int position = callback.findRev( "." );
QString sModule = callback.left( position );
QString sFunction = callback.right( callback.length() - ( position + 1 ) );
Index: tempeffect.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/tempeffect.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** tempeffect.h 19 Aug 2004 01:59:16 -0000 1.27
--- tempeffect.h 19 Aug 2004 05:28:21 -0000 1.28
***************
*** 98,102 ****
{
// Find the last dot
! Q_INT32 position = dispelFunc_.findRev( "." );
QString sModule = dispelFunc_.left( position );
QString sFunction = dispelFunc_.right( dispelFunc_.length() - ( position + 1 ) );
--- 98,102 ----
{
// Find the last dot
! int position = dispelFunc_.findRev( "." );
QString sModule = dispelFunc_.left( position );
QString sFunction = dispelFunc_.right( dispelFunc_.length() - ( position + 1 ) );
***************
*** 146,150 ****
{
// Find the last dot
! Q_INT32 position = functionName.findRev( "." );
QString sModule = functionName.left( position );
QString sFunction = functionName.right( functionName.length() - ( position + 1 ) );
--- 146,150 ----
{
// Find the last dot
! int position = functionName.findRev( "." );
QString sModule = functionName.left( position );
QString sFunction = functionName.right( functionName.length() - ( position + 1 ) );
Index: socket.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/socket.cpp,v
retrieving revision 1.82
retrieving revision 1.83
diff -C2 -d -r1.82 -r1.83
*** socket.cpp 19 Aug 2004 01:59:16 -0000 1.82
--- socket.cpp 19 Aug 2004 05:28:21 -0000 1.83
***************
*** 421,425 ****
else if ( PyUnicode_Check( item ) )
{
! gump->addRawLayout( QString::fromUcs2( ( ushort * ) PyUnicode_AS_UNICODE( item ) ) );
}
else
--- 421,425 ----
else if ( PyUnicode_Check( item ) )
{
! gump->addRawLayout( Python2QString( item ) );
}
else
***************
*** 439,443 ****
else if ( PyUnicode_Check( item ) )
{
! gump->addRawText( QString::fromUcs2( ( ushort * ) PyUnicode_AS_UNICODE( item ) ) );
}
else
--- 439,443 ----
else if ( PyUnicode_Check( item ) )
{
! gump->addRawText( Python2QString( item ) );
}
else
Index: utilities.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/utilities.h,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** utilities.h 2 Jun 2004 15:04:11 -0000 1.39
--- utilities.h 19 Aug 2004 05:28:21 -0000 1.40
***************
*** 129,134 ****
#define checkArgStr( id ) ( PyTuple_Size( args ) > id && ( PyString_Check( PyTuple_GetItem( args, id ) ) || PyUnicode_Check( PyTuple_GetItem( args, id ) ) ) )
#define checkArgUnicode( id ) ( PyTuple_Size( args ) > id && PyUnicode_Check( PyTuple_GetItem( args, id ) ) )
! #define getArgStr( id ) (PyString_Check(PyTuple_GetItem(args,id)) ? QString(PyString_AsString(PyTuple_GetItem(args, id))) : QString::fromUcs2((ushort*)PyUnicode_AS_UNICODE(PyTuple_GetItem(args,id))))
! #define getArgUnicode( id ) PyUnicode_AsUnicode( PyTuple_GetItem( args, id ) )
#define getUnicodeSize( id ) PyUnicode_GetSize( PyTuple_GetItem( args, id ) )
#define checkArgAccount( id ) ( PyTuple_Size( args ) > id && checkWpAccount( PyTuple_GetItem( args, id ) ) )
--- 129,134 ----
#define checkArgStr( id ) ( PyTuple_Size( args ) > id && ( PyString_Check( PyTuple_GetItem( args, id ) ) || PyUnicode_Check( PyTuple_GetItem( args, id ) ) ) )
#define checkArgUnicode( id ) ( PyTuple_Size( args ) > id && PyUnicode_Check( PyTuple_GetItem( args, id ) ) )
! #define getArgStr( id ) (Python2QString(PyTuple_GetItem(args,id)))
! #define getArgUnicode( id ) Python2QString( PyTuple_GetItem( args, id ) )
#define getUnicodeSize( id ) PyUnicode_GetSize( PyTuple_GetItem( args, id ) )
#define checkArgAccount( id ) ( PyTuple_Size( args ) > id && checkWpAccount( PyTuple_GetItem( args, id ) ) )
***************
*** 155,159 ****
--- 155,163 ----
if ( PyUnicode_Check( object ) )
{
+ #if defined(Py_UNICODE_WIDE)
+ return QString::fromUtf8( PyUnicode_AsUTF8String( object ) );
+ #else
return QString::fromUcs2( ( ushort * ) PyUnicode_AS_UNICODE( object ) );
+ #endif
}
else if ( PyString_Check( object ) )
Index: target.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/target.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** target.h 19 Aug 2004 01:59:16 -0000 1.20
--- target.h 19 Aug 2004 05:28:21 -0000 1.21
***************
*** 137,141 ****
{
// Find the last dot
! Q_INT32 position = responsefunc.findRev( "." );
QString sModule = responsefunc.left( position );
QString sFunction = responsefunc.right( responsefunc.length() - ( position + 1 ) );
--- 137,141 ----
{
// Find the last dot
! int position = responsefunc.findRev( "." );
QString sModule = responsefunc.left( position );
QString sFunction = responsefunc.right( responsefunc.length() - ( position + 1 ) );
***************
*** 175,179 ****
{
// Find the last dot
! Q_INT32 position = timeoutfunc.findRev( "." );
QString sModule = timeoutfunc.left( position );
QString sFunction = timeoutfunc.right( timeoutfunc.length() - ( position + 1 ) );
--- 175,179 ----
{
// Find the last dot
! int position = timeoutfunc.findRev( "." );
QString sModule = timeoutfunc.left( position );
QString sFunction = timeoutfunc.right( timeoutfunc.length() - ( position + 1 ) );
***************
*** 210,214 ****
{
// Find the last dot
! Q_INT32 position = cancelfunc.findRev( "." );
QString sModule = cancelfunc.left( position );
QString sFunction = cancelfunc.right( cancelfunc.length() - ( position + 1 ) );
--- 210,214 ----
{
// Find the last dot
! int position = cancelfunc.findRev( "." );
QString sModule = cancelfunc.left( position );
QString sFunction = cancelfunc.right( cancelfunc.length() - ( position + 1 ) );
|