[PyQt] sip doesn't recognize structs with parent structs/classes

Jim Bublitz jbublitz at nwinternet.com
Thu Jul 17 00:44:58 BST 2008


On Wednesday 16 July 2008 16:12, Erick Tryzelaar wrote:
> I've got a simple sip file that has:
>
> struct Foo {
> %TypeHeaderCode
> #include "foo.h"
> %End
>
>   virtual Foo();
> };
>
> struct Bar: Foo {
> %TypeHeaderCode
> #include "foo.h"
> %End
>
>   virtual Bar();
> };
>
>
> That should be valid code though, right?


It's valid C++, sip may or may not accept it (sip only covers a meaningful subset of C++), and it's identical to the following code which sip will accept:

class Foo {
%TypeHeaderCode
#include "foo.h"
%End

public:
  virtual Foo();
};

class Bar: Foo {
%TypeHeaderCode
#include "foo.h"
%End

public:
   virtual Bar();
};

Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20080717/a896547c/attachment.html


More information about the PyQt mailing list