On Tue, 18 Nov 2008 13:16:15 +0000 (UTC), MatteoBertini
<[EMAIL PROTECTED]> wrote:
> Giovanni Bajo <rasky <at> develer.com> writes:
> 
>> > > &&  !PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)subtype)
>> > 
>> > && PyType_IsSubtype((PyTypeObject *)subtype, (PyTypeObject *)type)
>> > 
>> 
>> By inverting the arguments, you're effectively inverting the resulting
>> truth-value and thus obtaining the same effect that you obtain by
>> commenting it.
> 
> I have removed the ! in front too.
> 
> The problem can be related with the question "IsSubtype(a, a) == True?"
> (not investigated)

I think you are right. Try changing the line to...

if (subtype != NULL &&
    (type == subtype ||
     !PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)subtype)))

...I think.

Phil
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to