Re: [PyQt] sip doesn't recognize structs with parent structs/classes
On Tue, 29 Jul 2008 16:05:16 -0700, Erick Tryzelaar [EMAIL PROTECTED] wrote: On Tue, Jul 22, 2008 at 3:39 PM, Phil Thompson [EMAIL PROTECTED] wrote: The virtuals aren't valid, but the super-classes should be. Fixed in tonight's snapshot. Thanks again for the change, Phil. I think you might be mistaken on this point though. Looking at the c++ standard that I found: http://www.kuzbass.ru/docs/isocpp/ In section 9-4, it says that structs are just classes that default to public. Furthermore, in section 10.3-2, they give an example of structs with virtual methods. It's fine with me if you don't to add support to sip for this. I can work around it by just using class in my sip file and structs in my headers, it's just a tiny bit more verbose. It's the virtual constructors that are invalid, not virtual methods. Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] sip doesn't recognize structs with parent structs/classes
On 29.07.08 16:05:16, Erick Tryzelaar wrote: On Tue, Jul 22, 2008 at 3:39 PM, Phil Thompson [EMAIL PROTECTED] wrote: The virtuals aren't valid, but the super-classes should be. Fixed in tonight's snapshot. Thanks again for the change, Phil. I think you might be mistaken on this point though. Looking at the c++ standard that I found: http://www.kuzbass.ru/docs/isocpp/ In section 9-4, it says that structs are just classes that default to public. Furthermore, in section 10.3-2, they give an example of structs with virtual methods. But methods always have a return value, what you had in your original post are constructors and it doesn't make sense for those to be virtual because a subclass always calls its super-class-constructor. Andreas -- You shall be rewarded for a dastardly deed. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] sip doesn't recognize structs with parent structs/classes
On Wed, Jul 30, 2008 at 12:07 AM, Phil Thompson [EMAIL PROTECTED] wrote: It's the virtual constructors that are invalid, not virtual methods. Oh, duh. I didn't even notice that I did that. Next time I'll copy real code instead of rewriting it for email. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] sip doesn't recognize structs with parent structs/classes
On Tue, Jul 22, 2008 at 3:39 PM, Phil Thompson [EMAIL PROTECTED] wrote: The virtuals aren't valid, but the super-classes should be. Fixed in tonight's snapshot. Thanks again for the change, Phil. I think you might be mistaken on this point though. Looking at the c++ standard that I found: http://www.kuzbass.ru/docs/isocpp/ In section 9-4, it says that structs are just classes that default to public. Furthermore, in section 10.3-2, they give an example of structs with virtual methods. It's fine with me if you don't to add support to sip for this. I can work around it by just using class in my sip file and structs in my headers, it's just a tiny bit more verbose. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] sip doesn't recognize structs with parent structs/classes
On Wed, 16 Jul 2008 16:12:15 -0700, Erick Tryzelaar [EMAIL PROTECTED] 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? The virtuals aren't valid, but the super-classes should be. Fixed in tonight's snapshot. Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] sip doesn't recognize structs with parent structs/classes
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? ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] sip doesn't recognize structs with parent structs/classes
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___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt