<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hi Phil<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’m using SIP to wrap a large C++ library and am very impressed with the results so far – you’ve got an annotation for most of the use cases I’m interested in. However, I think I’ve found a bug. I’ve copied in below my own ‘description to self’ of the problem, if it is not sufficient for you to see the problem then I’ll knock up a test case (let me know).<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>When the wrapper for a class or one of its super classes indicates 'virtual' for a method, a wrapper class is created in SIP called e.g. sipIwBrep, that checks if the python instance has an override method for the virtual call. If not then it calls what it thinks is the correct superclass call. However, it's idea of the correct superclass call (in this case the superclass being IwBrep) is actually calculated from the wrapper declarations and it effectively finds the nearest superclass where the relevant function is wrapped. In the case of this bug, IwObject was the first superclass to have IsKindOf in the .sip file, so sipIwBrep was incorrectly calling IwObject::IsKindOf instead of IwBrep::IsKindOf.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> I cannot see any reason why the SIP-produced subclass does not always call the method on the immediate superclass (i.e. the wrapped class, in this case IwBrep).<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I hope the above makes sense,<o:p></o:p></p><p class=MsoNormal>Regards<o:p></o:p></p><p class=MsoNormal>Tony<o:p></o:p></p></div></body></html>