Update of /cvsroot/wpdev/wolfpack/python
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30370/python
Modified Files:
char.cpp item.cpp socket.cpp
Log Message:
Fixed UCS4 problems.
Index: item.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/item.cpp,v
retrieving revision 1.135
retrieving revision 1.136
diff -C2 -d -r1.135 -r1.136
*** item.cpp 30 Sep 2004 19:58:52 -0000 1.135
--- item.cpp 1 Oct 2004 23:26:38 -0000 1.136
***************
*** 1,1465 ****
! /*
! * Wolfpack Emu (WP)
! * UO Server Emulation Program
! *
! * Copyright 2001-2004 by holders identified in AUTHORS.txt
! * This program is free software; you can redistribute it and/or modify
! * it under the terms of the GNU General Public License as published by
! * the Free Software Foundation; either version 2 of the License, or
! * (at your option) any later version.
! *
[...2890 lines suppressed...]
! if ( a->ob_type != &wpItemType || b->ob_type != &wpItemType )
! return -1;
!
! P_ITEM pA = getWpItem( a );
! P_ITEM pB = getWpItem( b );
!
! return !( pA == pB );
! }
!
! int PyConvertItem( PyObject* object, P_ITEM* item )
! {
! if ( object->ob_type != &wpItemType )
! {
! PyErr_BadArgument();
! return 0;
! }
!
! *item = ( ( wpItem * ) object )->pItem;
! return 1;
! }
Index: socket.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/socket.cpp,v
retrieving revision 1.87
retrieving revision 1.88
diff -C2 -d -r1.87 -r1.88
*** socket.cpp 30 Sep 2004 19:58:52 -0000 1.87
--- socket.cpp 1 Oct 2004 23:26:38 -0000 1.88
***************
*** 706,716 ****
return 0;
! if ( PyString_Check( object ) )
! {
! self->pSock->tags().set( key, cVariant( PyString_AsString( object ) ) );
! }
! else if ( PyUnicode_Check( object ) )
{
! self->pSock->tags().set( key, cVariant( QString::fromUcs2( ( ushort * ) PyUnicode_AsUnicode( object ) ) ) );
}
else if ( PyInt_Check( object ) )
--- 706,712 ----
return 0;
! if ( PyString_Check( object ) || PyUnicode_Check( object ) )
{
! self->pSock->tags().set( key, cVariant( Python2QString( object ) ) );
}
else if ( PyInt_Check( object ) )
Index: char.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/char.cpp,v
retrieving revision 1.202
retrieving revision 1.203
diff -C2 -d -r1.202 -r1.203
*** char.cpp 1 Oct 2004 16:32:54 -0000 1.202
--- char.cpp 1 Oct 2004 23:26:38 -0000 1.203
***************
*** 996,1006 ****
return 0;
! if ( PyString_Check( object ) )
! {
! self->pChar->setTag( key, cVariant( PyString_AsString( object ) ) );
! }
! else if ( PyUnicode_Check( object ) )
{
! self->pChar->setTag( key, cVariant( QString::fromUcs2( ( ushort * ) PyUnicode_AsUnicode( object ) ) ) );
}
else if ( PyLong_Check( object ) )
--- 996,1002 ----
return 0;
! if ( PyString_Check( object ) || PyUnicode_Check( object ) )
{
! self->pChar->setTag( key, cVariant( Python2QString( object ) ) );
}
else if ( PyLong_Check( object ) )
|