[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyKDE] sip and virtual private destructors
From:       Phil Thompson <phil () riverbankcomputing ! co ! uk>
Date:       2003-06-28 14:43:51
[Download RAW message or body]

On Wednesday 25 June 2003 6:03 pm, Gerard Vermeulen wrote:
> On Wed, 25 Jun 2003 09:13:21 -0400
>
> "A.M. Kuchling" <amk@asti-usa.com> wrote:
> > I'm wrapping a C++ library with SIP, and have a class with a virtual
> > private destructor.  sip reports a parse error when confronted with a
> > declaration like "virtual ~GmOptions();".  I can remove the "virtual"
> > qualifier, but then the module fails to load, unable to find a mangled
> > "_ZTI9GmOptions" symbol that I'm guessing is due to the destructor
> > type being wrong.
> >
> > Any suggestions?  Are there any virtual destructors wrapped in PyQt or
> > PyKDE that I could look at as an example?
>
> My advice is not to wrap the virtual destructors.
>
> Some background:
> (1) support of virtual destructors in sip is about a week old (see a
> recent snapshot).

The change is actually trivial. The code that is generated has always been 
generated in 99% of cases that it was needed. The change made it 100% (and 
helped fix the memory leak when using QCustomEvent).

> (2) sip derives interface classes from the wrapped classes; in this
> scheme it is hard to see how sip can handle private virtual destructors
> (but I am not the most qualified person to say so).

That's correct - they can't be handled.

Phil

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic