Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-1024

shared pointer SKB_*_IDX conflicts

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.15.0
    • 5.12.3
    • Shiboken
    • None
    • All
    • 6e77dec18651a023b8447ed7ce64c2a1db6e2462 (pyside/pyside-setup/5.12)

    Description

      have two typesystems, both using the same shared pointer and then have one typesystem include the other. shiboken will then generate two `SKB_*_IDX` with the same name in two different anon enums, leading to duplicate declarations. The attached patch reproduces the issue in the 5.12 branch of pyside-setup. The error is:

      In file included from /ssd2/milian/projects/qt5/src/pyside-setup/pyside3_build/py3.7-qt5.12.3-64bit-release/shiboken2/tests/otherbinding/other/extendsnoimplicitconversion_wrapper.cpp:10:
      /ssd2/milian/projects/qt5/src/pyside-setup/pyside3_build/py3.7-qt5.12.3-64bit-release/shiboken2/tests/otherbinding/other/other_python.h:45:64: error: ‘SBK_SHAREDPTR_INTEGER_IDX’ conflicts with a previous declaration
           SBK_SHAREDPTR_INTEGER_IDX                                = 5, // const SharedPtr<Integer > &
                                                                      ^
      In file included from /ssd2/milian/projects/qt5/src/pyside-setup/pyside3_build/py3.7-qt5.12.3-64bit-release/shiboken2/tests/otherbinding/other/other_python.h:13,
                       from /ssd2/milian/projects/qt5/src/pyside-setup/pyside3_build/py3.7-qt5.12.3-64bit-release/shiboken2/tests/otherbinding/other/extendsnoimplicitconversion_wrapper.cpp:10:
      /ssd2/milian/projects/qt5/src/pyside-setup/pyside3_build/py3.7-qt5.12.3-64bit-release/shiboken2/tests/smartbinding/smart/smart_python.h:24:5: note: previous declaration ‘<unnamed enum> SBK_SHAREDPTR_INTEGER_IDX’
           SBK_SHAREDPTR_INTEGER_IDX                                = 5, // SharedPtr<Integer >
           ^~~~~~~~~~~~~~~~~~~~~~~~~
      

      Attachments

        1. 0001-Unit-test-for-shared-ptr.patch
          4 kB
        2. pyside1024_diag.diff
          2 kB
        3. pyside1024_log.txt
          0.5 kB
        4. pyside1024_repro.diff
          4 kB
        5. reproduce.patch
          3 kB

        Issue Links

          Activity

            People

              kleint Friedemann Kleint
              milianw Milian Wolff
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: