Diamond Inheritance with SIP 4.19.15

Scott Talbert <[email protected]>
Newsgroups gmane.comp.python.pyqt-pykde
Message-ID <[email protected]>
I'm seeing a compilation error when trying to compile wxPython 4 with SIP 
4.19.15 (4.19.14 works):

../../../../sip/cpp/sip_corewxVarHVScrollHelper.cpp: In function Β‘void* 
cast_wxVarHVScrollHelper(void*, const sipTypeDef*)Β’:
../../../../sip/cpp/sip_corewxVarHVScrollHelper.cpp:1332:62: error: 
Β‘wxVarScrollHelperBaseΒ’ is an ambiguous base of Β‘wxVarHVScrollHelperΒ’
          return static_cast< ::wxVarScrollHelperBase *>(sipCpp);
                                                               ^

This is the class inheritance diagram:

//                  wxVarScrollHelperBase                       |
//                   /                 \                        |
//                  /                   \                       |
//                 V                     V                      |
//  wxVarHScrollHelper                 wxVarVScrollHelper       |
//       |          \                   /           |           |
//       |           \                 /            |           |
//       |            V               V             |           |
//       |           wxVarHVScrollHelper            |           |

This is the body of cast_wxVarHVScrollHelper generated by SIP 4.19.14:

static void *cast_wxVarHVScrollHelper(void *sipCppV, const sipTypeDef 
*targetType)
{
      ::wxVarHVScrollHelper *sipCpp = reinterpret_cast< 
::wxVarHVScrollHelper *>(sipCppV);

     if (targetType == sipType_wxVarVScrollHelper)
         return static_cast< ::wxVarVScrollHelper *>(sipCpp);

     if (targetType == sipType_wxVarHScrollHelper)
         return static_cast< ::wxVarHScrollHelper *>(sipCpp);

     return sipCppV;
}

This is the body of cast_wxVarHVScrollHelper generated with SIP 4.19.15:

static void *cast_wxVarHVScrollHelper(void *sipCppV, const sipTypeDef 
*targetType)
{
      ::wxVarHVScrollHelper *sipCpp = reinterpret_cast< 
::wxVarHVScrollHelper *>(sipCppV);

     if (targetType == sipType_wxVarVScrollHelper)
         return static_cast< ::wxVarVScrollHelper *>(sipCpp);

     if (targetType == sipType_wxVarScrollHelperBase)
         return static_cast< ::wxVarScrollHelperBase *>(sipCpp);

     if (targetType == sipType_wxVarHScrollHelper)
         return static_cast< ::wxVarHScrollHelper *>(sipCpp);

     return sipCppV;
}

It seems that SIP should not be trying to cast to wxVarScrollHelperBase.

Scott

_______________________________________________
PyQt mailing list    [email protected]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.