[PyKDE] SIP issues.

Gerard Vermeulen gerard.vermeulen at grenoble.cnrs.fr
Wed Nov 24 11:50:01 GMT 2004


On Wed, 24 Nov 2004 09:34:08 -0000 (GMT)
"Phil Thompson" <phil at riverbankcomputing.co.uk> wrote:

> > Hi,
> >
> > When trying to wrap QwtPlot3D (http://qwtplot3d.sourceforge.net), I
> > encountered
> > several issues with SIP:
> >
> > (1) Problems in getting an (abstract) virtual operator() working. Finally,
> >     the following code works with SIP4 (thanks to the extra class
> > PyFunction)
> >     but not (yet) with SIP3:
> 
> I don't think virtual operators are supposed to work (that's a feature).
> The parser should complain if you try (that's a bug). I'll look in more
> detail.
> 
Obviously it made it past the SIP4 (but not SIP3) parser.

QwtPlot3D has 4 occurrences of 'virtual TYPE operator(..) = 0;' and 1
occurrence of 'virtual TYPE operator(..);'

It is quite a common C++ idiom for classes that act like a mathematical
function, so I would hate it if you make the parser complain (I do not think
that it is important that SIP recognizes the '= 0').

I think, I can show how to change the generated code so that it works without
my hack of an extra helper class.  I'll try to do that tonight.

Gerard 





More information about the PyQt mailing list