[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] sip: wrong class virtual function being called
From: Phil Thompson <phil () riverbankcomputing ! com>
Date: 2015-06-09 9:33:17
Message-ID: 0e3a491ec3ab35120f0833d848bf4c15 () riverbankcomputing ! com
[Download RAW message or body]
On 05/06/2015 6:34 pm, Jeremy Sanders wrote:
> Hi -
>
> I'm having a problem with sip where the wrong version of a virtual
> function is being called. I'm overriding a virtual function in a
> python subclass of a C++ class. This function is being called by a C++
> container, which owns the class instance. If I keep a Python reference
> to the instance, then everything works.
>
> Please see the attached code. test.py calls the C++ code. Normally the
> code prints
>
> Object::func()
> 42
>
> If del in test.py is uncommented, then it prints
>
> Object::func()
> Object::func()
>
> Therefore the inherited virtual function is being called, not the
> overriding function.
>
> Is this a problem with my code, or a SIP bug? I'm using SIP 4.16.3 (on
> Ubuntu x86-64). Is there a workaround? I can change the C++ code.
SIP bug - should be fixed in tonight's snapshot/current hg.
I'd appreciate some quick testing as I want to make new releases very
soon.
Thanks,
Phil
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic