Description
This is related to PYSIDE-1024: It's now apparently impossible to use a non-smartptr type from one lib wrapped in a smartptr in another lib. The attached patch exemplifies this:
libsample wraps Pen but doesn't use it in a smartptr anywhere
libother tries to use SharedPtr<Pen>, but that then triggers:
[ 98%] Building CXX object tests/otherbinding/CMakeFiles/other.dir/other/otherobjecttype_wrapper.cpp.o /home/milian/projects/qt5/src/pyside-setup/pyside3d_build/py3.7-qt5.12.4-64bit-debug/shiboken2/tests/otherbinding/other/otherobjecttype_wrapper.cpp: In function ‘PyObject* Sbk_OtherObjectTypeFunc_foo(PyObject*, PyObject*)’: /home/milian/projects/qt5/src/pyside-setup/pyside3d_build/py3.7-qt5.12.4-64bit-debug/shiboken2/tests/otherbinding/other/otherobjecttype_wrapper.cpp:310:129: error: ‘SBK_SHAREDPTR_PEN_IDX’ was not declared in this scope; did you mean ‘SBK_SHAREDPTR_OBJ_IDX’? 310 | if ((pythonToCpp = Shiboken::Conversions::isPythonToCppReferenceConvertible(reinterpret_cast<SbkObjectType *>(SbksmartTypes[SBK_SHAREDPTR_PEN_IDX]), (pyArg)))) { | ^~~~~~~~~~~~~~~~~~~~~ | SBK_SHAREDPTR_OBJ_IDX /home/milian/projects/qt5/src/pyside-setup/pyside3d_build/py3.7-qt5.12.4-64bit-debug/shiboken2/tests/otherbinding/other/otherobjecttype_wrapper.cpp:347:109: error: ‘SBK_SHAREDPTR_PEN_IDX’ was not declared in this scope; did you mean ‘SBK_SHAREDPTR_OBJ_IDX’? 347 | if (Shiboken::Conversions::isImplicitConversion(reinterpret_cast<SbkObjectType *>(SbksmartTypes[SBK_SHAREDPTR_PEN_IDX]), pythonToCpp)) | ^~~~~~~~~~~~~~~~~~~~~ | SBK_SHAREDPTR_OBJ_IDX gmake[2]: *** [tests/otherbinding/CMakeFiles/other.dir/build.make:115: tests/otherbinding/CMakeFiles/other.dir/other/otherobjecttype_wrapper.cpp.o] Error 1 gmake[1]: *** [CMakeFiles/Makefile2:3574: tests/otherbinding/CMakeFiles/other.dir/all] Error 2 gmake: *** [Makefile:141: all] Error 2 makeobj[0]: Leaving directory `/home/milian/projects/qt5/src/pyside-setup/pyside3d_build/py3.7-qt5.12.4-64bit-debug/shiboken2'
Attachments
Issue Links
- relates to
-
PYSIDE-1024 shared pointer SKB_*_IDX conflicts
- Closed