[wpdev-commits] wolfpack/python socket.cpp,1.44,1.45 utilities.h,1.23,1.24
Brought to you by:
rip,
thiagocorrea
|
From: <co...@us...> - 2003-11-19 08:47:32
|
Update of /cvsroot/wpdev/wolfpack/python
In directory sc8-pr-cvs1:/tmp/cvs-serv19493/python
Modified Files:
socket.cpp utilities.h
Log Message:
Unicode sysmessages trough python implemented
Index: socket.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/socket.cpp,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -d -r1.44 -r1.45
*** socket.cpp 23 Sep 2003 23:55:25 -0000 1.44
--- socket.cpp 19 Nov 2003 08:47:28 -0000 1.45
***************
*** 101,105 ****
return PyFalse;
! if( !checkArgStr( 0 ) )
{
PyErr_BadArgument();
--- 101,118 ----
return PyFalse;
! QString message;
! PyObject* param;
! if( PyTuple_Size( args ) > 0 )
! param = PyTuple_GetItem( args, 0 );
!
! if( checkArgStr( 0 ) )
! {
! message = PyString_AsString( param );
! }
! else if( checkArgUnicode( 0 ) )
! {
! message.setUnicodeCodes( PyUnicode_AsUnicode(param), PyUnicode_GetSize( param ) ) ;
! }
! else
{
PyErr_BadArgument();
***************
*** 107,111 ****
}
- QString message = PyString_AsString( PyTuple_GetItem( args, 0 ) );
UINT16 color = 0x37;
UINT16 font = 3;
--- 120,123 ----
Index: utilities.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/utilities.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** utilities.h 23 Sep 2003 12:40:20 -0000 1.23
--- utilities.h 19 Nov 2003 08:47:29 -0000 1.24
***************
*** 119,122 ****
--- 119,123 ----
#define getArgInt( id ) PyInt_AsLong( PyTuple_GetItem( args, id ) )
#define checkArgStr( id ) ( PyTuple_Size( args ) > id && PyString_Check( PyTuple_GetItem( args, id ) ) )
+ #define checkArgUnicode( id ) ( PyTuple_Size( args ) > id && PyUnicode_Check( PyTuple_GetItem( args, id ) ) )
#define getArgStr( id ) PyString_AsString( PyTuple_GetItem( args, id ) )
#define checkArgAccount( id ) ( PyTuple_Size( args ) > id && checkWpAccount( PyTuple_GetItem( args, id ) ) )
|