[PyKDE] Compiling sip 4.1.1, PyQt 3.13, PyKDE 3.11.3 on Solaris8micro-Howto

Holger Joukl Holger.Joukl at LBBW.de
Mon Mar 7 09:13:12 GMT 2005


Giovanni wrote:
>...
>Your GCC compiler is almost 6 years old now. Isn't about time to update
>it? It would probably solve this and other problems with C++ codebases..

Well, we are in the process of moving to a newer GCC. But we have quite
a lot of production code right now compiled with 2.95.2. Moreover, our
intention was to wait as long as possible to maybe see some standardization
regarding ABI and name mangling issues.

>> <sipkdecorepart0.cpp>
>> ...
>>  48633                          sipRes = reinterpret_cast<const
>> QValueList<int> *>( &sipCpp -> KStartupInfoData::pids() );
>>  48634
>>  48635                          PyObject *sipResObj
>> sipConvertFrom_QValueList_1800(const_cast<QValueList<int> *>(sipRes));
>>  48636
>>  48637                          return sipResObj;
>>  48638                  }
>>  48639          }
>> ...
>> </sipkdecorepart0.cpp>

>I'm not sure a reinterpret_cast is *ever* a solution. Probably the point
>is where it is assumed that pid_t is int, rather than using pid_t
>directly.

I first tried to make QValueList<long> work with sip but did not succeed
immediately:-) (will look up how to
do that in the newly released snapshots which should fix this problem). But
above solution obviously works
for me and, as pointed out, int and long are the same for 32 bit compiles
on my machine.
Which makes a QValueList<int> the exact same as a QValueList<long> and
which makes the reinterpret_cast
perfectly valid int this situation.
Imho the solution is ugly because you have to modify *generated* code - but
it is a solution nevertheless.

Cheers,
Holger


Der Inhalt dieser E-Mail ist vertraulich. Falls Sie nicht der angegebene
Empfänger sind oder falls diese E-Mail irrtümlich an Sie adressiert wurde,
verständigen Sie bitte den Absender sofort und löschen Sie die E-Mail
sodann. Das unerlaubte Kopieren sowie die unbefugte Übermittlung sind nicht
gestattet. Die Sicherheit von Übermittlungen per E-Mail kann nicht
garantiert werden. Falls Sie eine Bestätigung wünschen, fordern Sie bitte
den Inhalt der E-Mail als Hardcopy an.

The contents of this  e-mail are confidential. If you are not the named
addressee or if this transmission has been addressed to you in error,
please notify the sender immediately and then delete this e-mail.  Any
unauthorized copying and transmission is forbidden. E-Mail transmission
cannot be guaranteed to be secure. If verification is required, please
request a hard copy version.




More information about the PyQt mailing list