Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23996
Modified Files:
basechar.cpp basics.h guilds.cpp pythonscript.h
Log Message:
should now be possible to use UCS4 python
Index: guilds.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/guilds.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** guilds.cpp 19 Aug 2004 01:55:55 -0000 1.21
--- guilds.cpp 19 Aug 2004 05:28:21 -0000 1.22
***************
*** 521,536 ****
if ( guildtitle )
{
! if ( PyUnicode_Check( guildtitle ) )
! {
! info->setGuildTitle( QString::fromUcs2( ( ushort * ) PyUnicode_AS_UNICODE( guildtitle ) ) );
! }
! else if ( PyString_Check( guildtitle ) )
! {
! info->setGuildTitle( QString::fromUtf8( PyString_AsString( guildtitle ) ) );
! }
! else
! {
! info->setGuildTitle( QString::null );
! }
}
--- 521,525 ----
if ( guildtitle )
{
! info->setGuildTitle( Python2QString( guildtitle ) );
}
***************
*** 791,851 ****
else if ( !strcmp( name, "name" ) )
{
! if ( PyUnicode_Check( value ) )
! {
! self->guild->setName( QString::fromUcs2( ( ushort * ) PyUnicode_AS_UNICODE( value ) ) );
! }
! else if ( PyString_Check( value ) )
! {
! self->guild->setName( QString::fromUtf8( PyString_AsString( value ) ) );
! }
! else
! {
! self->guild->setName( QString::null );
! }
}
else if ( !strcmp( name, "abbreviation" ) )
{
! if ( PyUnicode_Check( value ) )
! {
! self->guild->setAbbreviation( QString::fromUcs2( ( ushort * ) PyUnicode_AS_UNICODE( value ) ) );
! }
! else if ( PyString_Check( value ) )
! {
! self->guild->setAbbreviation( QString::fromUtf8( PyString_AsString( value ) ) );
! }
! else
! {
! self->guild->setAbbreviation( QString::null );
! }
}
else if ( !strcmp( name, "charta" ) )
{
! if ( PyUnicode_Check( value ) )
! {
! self->guild->setCharta( QString::fromUcs2( ( ushort * ) PyUnicode_AS_UNICODE( value ) ) );
! }
! else if ( PyString_Check( value ) )
! {
! self->guild->setCharta( QString::fromUtf8( PyString_AsString( value ) ) );
! }
! else
! {
! self->guild->setCharta( QString::null );
! }
}
else if ( !strcmp( name, "website" ) )
{
! if ( PyUnicode_Check( value ) )
! {
! self->guild->setWebsite( QString::fromUcs2( ( ushort * ) PyUnicode_AS_UNICODE( value ) ) );
! }
! else if ( PyString_Check( value ) )
! {
! self->guild->setWebsite( QString::fromUtf8( PyString_AsString( value ) ) );
! }
! else
! {
! self->guild->setWebsite( QString::null );
! }
}
else if ( !strcmp( name, "alignment" ) )
--- 780,796 ----
else if ( !strcmp( name, "name" ) )
{
! self->guild->setName( Python2QString( value ) );
}
else if ( !strcmp( name, "abbreviation" ) )
{
! self->guild->setAbbreviation( Python2QString( value ) );
}
else if ( !strcmp( name, "charta" ) )
{
! self->guild->setCharta( Python2QString( value ) );
}
else if ( !strcmp( name, "website" ) )
{
! self->guild->setWebsite( Python2QString( value ) );
}
else if ( !strcmp( name, "alignment" ) )
Index: pythonscript.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/pythonscript.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** pythonscript.h 19 Aug 2004 01:59:15 -0000 1.37
--- pythonscript.h 19 Aug 2004 05:28:21 -0000 1.38
***************
*** 155,159 ****
#define SET_INT_PROPERTY( id, setter ) if( name == id ) {\
bool ok; \
! Q_INT32 data = value.toInt( &ok ); \
if( !ok ) \
PROPERTY_ERROR( -2, "Integer expected" ) \
--- 155,159 ----
#define SET_INT_PROPERTY( id, setter ) if( name == id ) {\
bool ok; \
! int data = value.toInt( &ok ); \
if( !ok ) \
PROPERTY_ERROR( -2, "Integer expected" ) \
Index: basechar.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/basechar.cpp,v
retrieving revision 1.133
retrieving revision 1.134
diff -C2 -d -r1.133 -r1.134
*** basechar.cpp 19 Aug 2004 01:59:15 -0000 1.133
--- basechar.cpp 19 Aug 2004 05:28:21 -0000 1.134
***************
*** 1529,1533 ****
{
bool ok;
! Q_INT32 data = value.toInt( &ok );
if ( !ok )
PROPERTY_ERROR( -2, "Integer expected" )
--- 1529,1533 ----
{
bool ok;
! int data = value.toInt( &ok );
if ( !ok )
PROPERTY_ERROR( -2, "Integer expected" )
***************
*** 1542,1546 ****
{
bool ok;
! Q_INT32 data = value.toInt( &ok );
if ( !ok )
PROPERTY_ERROR( -2, "Integer expected" )
--- 1542,1546 ----
{
bool ok;
! int data = value.toInt( &ok );
if ( !ok )
PROPERTY_ERROR( -2, "Integer expected" )
***************
*** 1555,1559 ****
{
bool ok;
! Q_INT32 data = value.toInt( &ok );
if ( !ok )
PROPERTY_ERROR( -2, "Integer expected" )
--- 1555,1559 ----
{
bool ok;
! int data = value.toInt( &ok );
if ( !ok )
PROPERTY_ERROR( -2, "Integer expected" )
***************
*** 1568,1572 ****
{
bool ok;
! Q_INT32 data = value.toInt( &ok );
if ( !ok )
PROPERTY_ERROR( -2, "Integer expected" )
--- 1568,1572 ----
{
bool ok;
! int data = value.toInt( &ok );
if ( !ok )
PROPERTY_ERROR( -2, "Integer expected" )
***************
*** 2620,2632 ****
if ( result )
{
! // Strings and Unicode Objects gladly accepted
! if ( PyString_Check( result ) )
! {
! name = PyString_AsString( result );
! }
! else if ( PyUnicode_Check( result ) )
! {
! name = QString::fromUcs2( ( ushort * ) PyUnicode_AS_UNICODE( result ) );
! }
}
--- 2620,2624 ----
if ( result )
{
! name = Python2QString( result );
}
Index: basics.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/basics.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** basics.h 18 Aug 2004 17:05:46 -0000 1.29
--- basics.h 19 Aug 2004 05:28:21 -0000 1.30
***************
*** 54,57 ****
--- 54,59 ----
unsigned int getNormalizedTime();
+
+
template <class T>
struct destroy_obj : std::unary_function<T, void>
|