Re: [PyQt] SIP Bug: virtual function wrapped twice due to deep inheritance from base class and ABC
There was a rogue enum in my sip file! I removed Reusability from PIPSocket.sip and it works as intended now. Thanks Phil. Phil Thompson-5 wrote: > > On Fri, 2 Jul 2010 06:49:59 -0700 (PDT), Demetrius Cassidy > wrote: >> Sorry Phil - corrected inheritance tree: >> >> PUDPSocket <- PIPDataGramSocket <- PIPSocket <- PSocket (ABC) >> PTCPSocket <- PIPSocket <- PSocket (ABC) >> >> PUDPSocket does not have a 'Listen' function in it, instead it just >> inherits >> it from PIPSocket, who overrides PSocket. > > No it doesn't. PIPSocket::Listen() has a different signature to > PSocket::Listen() because they refer to different enums (both called > Reusability). > >> PTCPSocket DOES include a 'Listen' function in it, and overrides it from >> PIPSocket and PSocket. >> >> I've attached the corresponding sip files and the generated .cpp files > from >> sip. >> >> Below I've also included a snippet of the generated code for both > classes. >> The weird thing is that SIP wraps the PIPSocket Listen function, along > with >> the one from PSocket. http://old.nabble.com/file/p29056623/ptlib.rar >> ptlib.rar >> >> >> class sipPUDPSocket : public PUDPSocket >> { >> public: >> >> >> /* >> * There is a protected method for every virtual method visible from >> * this class. >> */ >> protected: >> ... >> PBoolean Listen(unsigned,WORD,PIPSocket::Reusability); >> PBoolean Listen(const >> PIPSocket::Address&,unsigned,WORD,PIPSocket::Reusability); >> ... >> PBoolean Listen(unsigned,WORD,PSocket::Reusability); >> } >> >> class sipPTCPSocket : public PTCPSocket >> { >> public: >> ... >> /* >> * There is a protected method for every virtual method visible from >> * this class. >> */ >> protected: >> PBoolean Listen(unsigned,WORD,PIPSocket::Reusability); >> PBoolean Listen(const >> PIPSocket::Address&,unsigned,WORD,PIPSocket::Reusability); >> ... >> PBoolean Listen(unsigned,WORD,PSocket::Reusability); >> }; >> >> Both classes share the same exact inheritance bug when wrapped: > > Given your .sip files, the above generated code is correct. > > It looks like you have a bug in your C++ code - I'd remove the > PIPSocket::Reusability enum. > > Phil > ___ > PyQt mailing listPyQt@riverbankcomputing.com > http://www.riverbankcomputing.com/mailman/listinfo/pyqt > > -- View this message in context: http://old.nabble.com/SIP-Bug%3A-virtual-function-wrapped-twice-due-to-deep-inheritance-from-base-class-and-ABC-tp28936011p29064613.html Sent from the PyQt mailing list archive at Nabble.com. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] SIP Bug: virtual function wrapped twice due to deep inheritance from base class and ABC
On Fri, 2 Jul 2010 06:49:59 -0700 (PDT), Demetrius Cassidy wrote: > Sorry Phil - corrected inheritance tree: > > PUDPSocket <- PIPDataGramSocket <- PIPSocket <- PSocket (ABC) > PTCPSocket <- PIPSocket <- PSocket (ABC) > > PUDPSocket does not have a 'Listen' function in it, instead it just > inherits > it from PIPSocket, who overrides PSocket. No it doesn't. PIPSocket::Listen() has a different signature to PSocket::Listen() because they refer to different enums (both called Reusability). > PTCPSocket DOES include a 'Listen' function in it, and overrides it from > PIPSocket and PSocket. > > I've attached the corresponding sip files and the generated .cpp files from > sip. > > Below I've also included a snippet of the generated code for both classes. > The weird thing is that SIP wraps the PIPSocket Listen function, along with > the one from PSocket. http://old.nabble.com/file/p29056623/ptlib.rar > ptlib.rar > > > class sipPUDPSocket : public PUDPSocket > { > public: > > > /* > * There is a protected method for every virtual method visible from > * this class. > */ > protected: > ... > PBoolean Listen(unsigned,WORD,PIPSocket::Reusability); > PBoolean Listen(const > PIPSocket::Address&,unsigned,WORD,PIPSocket::Reusability); > ... > PBoolean Listen(unsigned,WORD,PSocket::Reusability); > } > > class sipPTCPSocket : public PTCPSocket > { > public: > ... > /* > * There is a protected method for every virtual method visible from > * this class. > */ > protected: > PBoolean Listen(unsigned,WORD,PIPSocket::Reusability); > PBoolean Listen(const > PIPSocket::Address&,unsigned,WORD,PIPSocket::Reusability); > ... > PBoolean Listen(unsigned,WORD,PSocket::Reusability); > }; > > Both classes share the same exact inheritance bug when wrapped: Given your .sip files, the above generated code is correct. It looks like you have a bug in your C++ code - I'd remove the PIPSocket::Reusability enum. Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] SIP Bug: virtual function wrapped twice due to deep inheritance from base class and ABC
Sorry Phil - corrected inheritance tree: PUDPSocket <- PIPDataGramSocket <- PIPSocket <- PSocket (ABC) PTCPSocket <- PIPSocket <- PSocket (ABC) PUDPSocket does not have a 'Listen' function in it, instead it just inherits it from PIPSocket, who overrides PSocket. PTCPSocket DOES include a 'Listen' function in it, and overrides it from PIPSocket and PSocket. I've attached the corresponding sip files and the generated .cpp files from sip. Below I've also included a snippet of the generated code for both classes. The weird thing is that SIP wraps the PIPSocket Listen function, along with the one from PSocket. http://old.nabble.com/file/p29056623/ptlib.rar ptlib.rar class sipPUDPSocket : public PUDPSocket { public: /* * There is a protected method for every virtual method visible from * this class. */ protected: ... PBoolean Listen(unsigned,WORD,PIPSocket::Reusability); PBoolean Listen(const PIPSocket::Address&,unsigned,WORD,PIPSocket::Reusability); ... PBoolean Listen(unsigned,WORD,PSocket::Reusability); } class sipPTCPSocket : public PTCPSocket { public: ... /* * There is a protected method for every virtual method visible from * this class. */ protected: PBoolean Listen(unsigned,WORD,PIPSocket::Reusability); PBoolean Listen(const PIPSocket::Address&,unsigned,WORD,PIPSocket::Reusability); ... PBoolean Listen(unsigned,WORD,PSocket::Reusability); }; Both classes share the same exact inheritance bug when wrapped: Phil Thompson-5 wrote: > > On Thu, 1 Jul 2010 17:53:23 -0700 (PDT), Demetrius Cassidy > wrote: >> Phil, >> >> It's not code specific to that class. It's due to the deep inheritance >> tree. >> You should be able to run my test code and get the same results. >> >> Basically to sum it up: >> >> PTCPSocket <- PIPDataGramSocket <- PIPSocket <- PSocket (ABC) >> >> PTCPSocket, PIPSocket and PSocket all define a virtual function called >> 'Listen'. >> Commenting 'Listen' out from PSocket, and SIP does not include the > function >> twice. >> Listen is NOT a pure virtual function in the ABC, it has a body. >> Listen is fully defined in PTCPSocket, and the other classes except >> PIPDataGramSocket. > > The error appears in PUDPSocket but you don't even mention that class. > Where does it fit in the inheritance tree? > > Phil > > >> Phil Thompson-5 wrote: >>> >>> On Sat, 19 Jun 2010 10:27:55 -0700 (PDT), Demetrius Cassidy >>> wrote: Basically I have a Listen() function in a derived class, that is also > in the base and ABC. For some reason sip ends up wrapping the same function >>> twice (it has a body in the ABC), even though it's a virtual function in all of the >>> derived classes. If I comment out this function in the ABC, everything works fine, but otherwise I get a C2535 compiler error with Visual C++. Here is what sip comes up with: class sipPUDPSocket : public PUDPSocket { /* * There is a protected method for every virtual method visible > from * this class. */ protected: PBoolean Listen(unsigned,WORD,PIPSocket::Reusability); /*more wrapped functions*/ PBoolean Listen(unsigned,WORD,PIPSocket::Reusability); // <-- >>> duplicate function }; C++ nmake errors: sippyptlibPTCPSocket.cpp .\sippyptlibPTCPSocket.cpp(121) : error C2535: 'PBoolean sipPTCPSocket::Listen(unsigned int,WORD,PSocket::Reusability)' : member function already defined or declared .\sippyptlibPTCPSocket.cpp(102) : see declaration of 'sipPTCPSocket::Listen' .\sippyptlibPTCPSocket.cpp(506) : error C2084: function 'PBoolean sipPTCPSocket: :Listen(unsigned int,WORD,PSocket::Reusability)' already has a body .\sippyptlibPTCPSocket.cpp(102) : see previous definition of 'Listen' Basic code structure based on what I am wrapping - note that I only included the offending function here, as it would be too much code to include everything. >>> >>> But you at least need to include the definition of PUDPSocket. >>> typedef bool PBoolean; class PTCPSocket : PIPDataGramSocket { public: virtual PBoolean Listen(unsigned int, WORD, PSocket::Reusability); } class PIPDataGramSocket : PIPSocket { protected: PIPDataGramSocket(); } class PIPSocket : PSocket { public: virtual PBoolean Listen(unsigned int, WORD, PSocket::Reusability); } class PSocket /Abstract/ { public: /// Flags to reuse of port numbers in Listen() function. enum Reusability { CanReuseAddress, AddressIsExclusive }; virtual PBoolean Li
Re: [PyQt] SIP Bug: virtual function wrapped twice due to deep inheritance from base class and ABC
On Thu, 1 Jul 2010 17:53:23 -0700 (PDT), Demetrius Cassidy wrote: > Phil, > > It's not code specific to that class. It's due to the deep inheritance > tree. > You should be able to run my test code and get the same results. > > Basically to sum it up: > > PTCPSocket <- PIPDataGramSocket <- PIPSocket <- PSocket (ABC) > > PTCPSocket, PIPSocket and PSocket all define a virtual function called > 'Listen'. > Commenting 'Listen' out from PSocket, and SIP does not include the function > twice. > Listen is NOT a pure virtual function in the ABC, it has a body. > Listen is fully defined in PTCPSocket, and the other classes except > PIPDataGramSocket. The error appears in PUDPSocket but you don't even mention that class. Where does it fit in the inheritance tree? Phil > Phil Thompson-5 wrote: >> >> On Sat, 19 Jun 2010 10:27:55 -0700 (PDT), Demetrius Cassidy >> wrote: >>> Basically I have a Listen() function in a derived class, that is also in >>> the >>> base and ABC. For some reason sip ends up wrapping the same function >> twice >>> (it >>> has a body in the ABC), even though it's a virtual function in all of >>> the >> >>> derived classes. If I comment out this function in the ABC, everything >>> works >>> fine, but otherwise I get a C2535 compiler error with Visual C++. >>> >>> Here is what sip comes up with: >>> >>> class sipPUDPSocket : public PUDPSocket >>> { >>> >>> /* >>> * There is a protected method for every virtual method visible from >>> >>> * this class. >>> */ >>> protected: >>> PBoolean Listen(unsigned,WORD,PIPSocket::Reusability); >>> /*more wrapped functions*/ >>> PBoolean Listen(unsigned,WORD,PIPSocket::Reusability); // <-- >> duplicate >>> function >>> }; >>> >>> C++ nmake errors: >>> >>> sippyptlibPTCPSocket.cpp >>> .\sippyptlibPTCPSocket.cpp(121) : error C2535: 'PBoolean >>> sipPTCPSocket::Listen(unsigned int,WORD,PSocket::Reusability)' >>> : member function already defined or declared >>> .\sippyptlibPTCPSocket.cpp(102) : see declaration of >>> 'sipPTCPSocket::Listen' >>> >>> >>> .\sippyptlibPTCPSocket.cpp(506) : error C2084: function 'PBoolean >>> sipPTCPSocket: >>> :Listen(unsigned int,WORD,PSocket::Reusability)' already has a body >>> .\sippyptlibPTCPSocket.cpp(102) : see previous definition of >>> 'Listen' >>> >>> >>> Basic code structure based on what I am wrapping - note that I only >>> included >>> the >>> offending function here, as it would be too much code to include >>> everything. >> >> But you at least need to include the definition of PUDPSocket. >> >>> typedef bool PBoolean; >>> >>> class PTCPSocket : PIPDataGramSocket >>> { >>> public: >>> virtual PBoolean Listen(unsigned int, WORD, PSocket::Reusability); >>> } >>> >>> class PIPDataGramSocket : PIPSocket >>> { >>> protected: >>> PIPDataGramSocket(); >>> } >>> >>> class PIPSocket : PSocket >>> { >>> public: >>> virtual PBoolean Listen(unsigned int, WORD, PSocket::Reusability); >>> } >>> >>> class PSocket /Abstract/ >>> { >>> public: >>> /// Flags to reuse of port numbers in Listen() function. >>> enum Reusability { >>> CanReuseAddress, >>> AddressIsExclusive >>> }; >>> >>> virtual PBoolean Listen(unsigned int, WORD, PSocket::Reusability); // >>> commenting this function out fixes this problem >>> >>> protected: >>> /*This function calls os_socket() with the correct parameters for >>> the >> >>>socket protocol type. >>> */ >>> virtual PBoolean OpenSocket() = 0; >>> >>> }; >> >> Phil >> ___ >> PyQt mailing listPyQt@riverbankcomputing.com >> http://www.riverbankcomputing.com/mailman/listinfo/pyqt >> >> ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] SIP Bug: virtual function wrapped twice due to deep inheritance from base class and ABC
Phil, It's not code specific to that class. It's due to the deep inheritance tree. You should be able to run my test code and get the same results. Basically to sum it up: PTCPSocket <- PIPDataGramSocket <- PIPSocket <- PSocket (ABC) PTCPSocket, PIPSocket and PSocket all define a virtual function called 'Listen'. Commenting 'Listen' out from PSocket, and SIP does not include the function twice. Listen is NOT a pure virtual function in the ABC, it has a body. Listen is fully defined in PTCPSocket, and the other classes except PIPDataGramSocket. Phil Thompson-5 wrote: > > On Sat, 19 Jun 2010 10:27:55 -0700 (PDT), Demetrius Cassidy > wrote: >> Basically I have a Listen() function in a derived class, that is also in >> the >> base and ABC. For some reason sip ends up wrapping the same function > twice >> (it >> has a body in the ABC), even though it's a virtual function in all of the > >> derived classes. If I comment out this function in the ABC, everything >> works >> fine, but otherwise I get a C2535 compiler error with Visual C++. >> >> Here is what sip comes up with: >> >> class sipPUDPSocket : public PUDPSocket >> { >> >> /* >> * There is a protected method for every virtual method visible from >> * this class. >> */ >> protected: >> PBoolean Listen(unsigned,WORD,PIPSocket::Reusability); >> /*more wrapped functions*/ >> PBoolean Listen(unsigned,WORD,PIPSocket::Reusability); // <-- > duplicate >> function >> }; >> >> C++ nmake errors: >> >> sippyptlibPTCPSocket.cpp >> .\sippyptlibPTCPSocket.cpp(121) : error C2535: 'PBoolean >> sipPTCPSocket::Listen(unsigned int,WORD,PSocket::Reusability)' >> : member function already defined or declared >> .\sippyptlibPTCPSocket.cpp(102) : see declaration of >> 'sipPTCPSocket::Listen' >> >> >> .\sippyptlibPTCPSocket.cpp(506) : error C2084: function 'PBoolean >> sipPTCPSocket: >> :Listen(unsigned int,WORD,PSocket::Reusability)' already has a body >> .\sippyptlibPTCPSocket.cpp(102) : see previous definition of >> 'Listen' >> >> >> Basic code structure based on what I am wrapping - note that I only >> included >> the >> offending function here, as it would be too much code to include >> everything. > > But you at least need to include the definition of PUDPSocket. > >> typedef bool PBoolean; >> >> class PTCPSocket : PIPDataGramSocket >> { >> public: >> virtual PBoolean Listen(unsigned int, WORD, PSocket::Reusability); >> } >> >> class PIPDataGramSocket : PIPSocket >> { >> protected: >> PIPDataGramSocket(); >> } >> >> class PIPSocket : PSocket >> { >> public: >> virtual PBoolean Listen(unsigned int, WORD, PSocket::Reusability); >> } >> >> class PSocket /Abstract/ >> { >> public: >> /// Flags to reuse of port numbers in Listen() function. >> enum Reusability { >> CanReuseAddress, >> AddressIsExclusive >> }; >> >> virtual PBoolean Listen(unsigned int, WORD, PSocket::Reusability); // >> commenting this function out fixes this problem >> >> protected: >> /*This function calls os_socket() with the correct parameters for the > >>socket protocol type. >> */ >> virtual PBoolean OpenSocket() = 0; >> >> }; > > Phil > ___ > PyQt mailing listPyQt@riverbankcomputing.com > http://www.riverbankcomputing.com/mailman/listinfo/pyqt > > -- View this message in context: http://old.nabble.com/SIP-Bug%3A-virtual-function-wrapped-twice-due-to-deep-inheritance-from-base-class-and-ABC-tp28936011p29051687.html Sent from the PyQt mailing list archive at Nabble.com. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] SIP Bug: virtual function wrapped twice due to deep inheritance from base class and ABC
On Sat, 19 Jun 2010 10:27:55 -0700 (PDT), Demetrius Cassidy wrote: > Basically I have a Listen() function in a derived class, that is also in > the > base and ABC. For some reason sip ends up wrapping the same function twice > (it > has a body in the ABC), even though it's a virtual function in all of the > derived classes. If I comment out this function in the ABC, everything > works > fine, but otherwise I get a C2535 compiler error with Visual C++. > > Here is what sip comes up with: > > class sipPUDPSocket : public PUDPSocket > { > > /* > * There is a protected method for every virtual method visible from > * this class. > */ > protected: > PBoolean Listen(unsigned,WORD,PIPSocket::Reusability); > /*more wrapped functions*/ > PBoolean Listen(unsigned,WORD,PIPSocket::Reusability); // <-- duplicate > function > }; > > C++ nmake errors: > > sippyptlibPTCPSocket.cpp > .\sippyptlibPTCPSocket.cpp(121) : error C2535: 'PBoolean > sipPTCPSocket::Listen(unsigned int,WORD,PSocket::Reusability)' > : member function already defined or declared > .\sippyptlibPTCPSocket.cpp(102) : see declaration of > 'sipPTCPSocket::Listen' > > > .\sippyptlibPTCPSocket.cpp(506) : error C2084: function 'PBoolean > sipPTCPSocket: > :Listen(unsigned int,WORD,PSocket::Reusability)' already has a body > .\sippyptlibPTCPSocket.cpp(102) : see previous definition of > 'Listen' > > > Basic code structure based on what I am wrapping - note that I only > included > the > offending function here, as it would be too much code to include > everything. But you at least need to include the definition of PUDPSocket. > typedef bool PBoolean; > > class PTCPSocket : PIPDataGramSocket > { > public: > virtual PBoolean Listen(unsigned int, WORD, PSocket::Reusability); > } > > class PIPDataGramSocket : PIPSocket > { > protected: > PIPDataGramSocket(); > } > > class PIPSocket : PSocket > { > public: > virtual PBoolean Listen(unsigned int, WORD, PSocket::Reusability); > } > > class PSocket /Abstract/ > { > public: > /// Flags to reuse of port numbers in Listen() function. > enum Reusability { > CanReuseAddress, > AddressIsExclusive > }; > > virtual PBoolean Listen(unsigned int, WORD, PSocket::Reusability); // > commenting this function out fixes this problem > > protected: > /*This function calls os_socket() with the correct parameters for the >socket protocol type. > */ > virtual PBoolean OpenSocket() = 0; > > }; Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] SIP Bug: virtual function wrapped twice due to deep inheritance from base class and ABC
Phil - have you seen this yet? Any comments? Demetrius Cassidy wrote: > > Basically I have a Listen() function in a derived class, that is also in > the > base and ABC. For some reason sip ends up wrapping the same function twice > (it > has a body in the ABC), even though it's a virtual function in all of the > derived classes. If I comment out this function in the ABC, everything > works > fine, but otherwise I get a C2535 compiler error with Visual C++. > > Here is what sip comes up with: > > class sipPUDPSocket : public PUDPSocket > { > > /* > * There is a protected method for every virtual method visible from > * this class. > */ > protected: > PBoolean Listen(unsigned,WORD,PIPSocket::Reusability); > /*more wrapped functions*/ > PBoolean Listen(unsigned,WORD,PIPSocket::Reusability); // <-- > duplicate > function > }; > > C++ nmake errors: > > sippyptlibPTCPSocket.cpp > .\sippyptlibPTCPSocket.cpp(121) : error C2535: 'PBoolean > sipPTCPSocket::Listen(unsigned int,WORD,PSocket::Reusability)' > : member function already defined or declared > .\sippyptlibPTCPSocket.cpp(102) : see declaration of > 'sipPTCPSocket::Listen' > > > .\sippyptlibPTCPSocket.cpp(506) : error C2084: function 'PBoolean > sipPTCPSocket: > :Listen(unsigned int,WORD,PSocket::Reusability)' already has a body > .\sippyptlibPTCPSocket.cpp(102) : see previous definition of > 'Listen' > > > Basic code structure based on what I am wrapping - note that I only > included the > offending function here, as it would be too much code to include > everything. > > typedef bool PBoolean; > > class PTCPSocket : PIPDataGramSocket > { > public: > virtual PBoolean Listen(unsigned int, WORD, PSocket::Reusability); > } > > class PIPDataGramSocket : PIPSocket > { > protected: > PIPDataGramSocket(); > } > > class PIPSocket : PSocket > { > public: > virtual PBoolean Listen(unsigned int, WORD, PSocket::Reusability); > } > > class PSocket /Abstract/ > { > public: > /// Flags to reuse of port numbers in Listen() function. > enum Reusability { > CanReuseAddress, > AddressIsExclusive > }; > > virtual PBoolean Listen(unsigned int, WORD, PSocket::Reusability); // > commenting this function out fixes this problem > > protected: > /*This function calls os_socket() with the correct parameters for the >socket protocol type. > */ > virtual PBoolean OpenSocket() = 0; > > }; > > -- > Regards, > -Demetrius Cassidy > > -- View this message in context: http://old.nabble.com/SIP-Bug%3A-virtual-function-wrapped-twice-due-to-deep-inheritance-from-base-class-and-ABC-tp28936011p28953735.html Sent from the PyQt mailing list archive at Nabble.com. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] SIP Bug: virtual function wrapped twice due to deep inheritance from base class and ABC
Basically I have a Listen() function in a derived class, that is also in the base and ABC. For some reason sip ends up wrapping the same function twice (it has a body in the ABC), even though it's a virtual function in all of the derived classes. If I comment out this function in the ABC, everything works fine, but otherwise I get a C2535 compiler error with Visual C++. Here is what sip comes up with: class sipPUDPSocket : public PUDPSocket { /* * There is a protected method for every virtual method visible from * this class. */ protected: PBoolean Listen(unsigned,WORD,PIPSocket::Reusability); /*more wrapped functions*/ PBoolean Listen(unsigned,WORD,PIPSocket::Reusability); // <-- duplicate function }; C++ nmake errors: sippyptlibPTCPSocket.cpp .\sippyptlibPTCPSocket.cpp(121) : error C2535: 'PBoolean sipPTCPSocket::Listen(unsigned int,WORD,PSocket::Reusability)' : member function already defined or declared .\sippyptlibPTCPSocket.cpp(102) : see declaration of 'sipPTCPSocket::Listen' .\sippyptlibPTCPSocket.cpp(506) : error C2084: function 'PBoolean sipPTCPSocket: :Listen(unsigned int,WORD,PSocket::Reusability)' already has a body .\sippyptlibPTCPSocket.cpp(102) : see previous definition of 'Listen' Basic code structure based on what I am wrapping - note that I only included the offending function here, as it would be too much code to include everything. typedef bool PBoolean; class PTCPSocket : PIPDataGramSocket { public: virtual PBoolean Listen(unsigned int, WORD, PSocket::Reusability); } class PIPDataGramSocket : PIPSocket { protected: PIPDataGramSocket(); } class PIPSocket : PSocket { public: virtual PBoolean Listen(unsigned int, WORD, PSocket::Reusability); } class PSocket /Abstract/ { public: /// Flags to reuse of port numbers in Listen() function. enum Reusability { CanReuseAddress, AddressIsExclusive }; virtual PBoolean Listen(unsigned int, WORD, PSocket::Reusability); // commenting this function out fixes this problem protected: /*This function calls os_socket() with the correct parameters for the socket protocol type. */ virtual PBoolean OpenSocket() = 0; }; -- Regards, -Demetrius Cassidy -- View this message in context: http://old.nabble.com/SIP-Bug%3A-virtual-function-wrapped-twice-due-to-deep-inheritance-from-base-class-and-ABC-tp28936011p28936011.html Sent from the PyQt mailing list archive at Nabble.com. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt