SIP v4.19.23 adds dependency on assignment operator

Jochen Sprickerhof pyqt at jochen.sprickerhof.de
Fri Jun 26 15:32:31 BST 2020


* Phil Thompson <phil at riverbankcomputing.com> [2020-06-26 15:28]:
>>* Phil Thompson <phil at riverbankcomputing.com> [2020-06-26 14:46]:
>>>So you need to tell SIP this by defining a private assignment 
>>>operator.
>>
>>I tried that but SIP still generates code that is refused by gcc:
>>
>>orocos_kdl/src/chainiksolvervel_pinv_givens.hpp:
>>
>>+     private:
>>+         ChainIkSolverVel_pinv_givens& operator=(const
>>ChainIkSolverVel_pinv_givens& other);
>>
>>python_orocos_kdl/PyKDL/sip/sipPyKDLpart1.cpp:
>>
>>extern "C" {static void
>>dealloc_ChainIkSolverVel_pinv_givens(sipSimpleWrapper *);}
>>static void dealloc_ChainIkSolverVel_pinv_givens(sipSimpleWrapper 
>>*sipSelf)
>>{
>>    if (sipIsDerivedClass(sipSelf))
>>        reinterpret_cast<sipChainIkSolverVel_pinv_givens
>>*>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;
>>
>>    if (sipIsOwnedByPython(sipSelf))
>>    {
>>        release_ChainIkSolverVel_pinv_givens(sipGetAddress(sipSelf),
>>sipIsDerivedClass(sipSelf));
>>    }
>>}
>>
>>python_orocos_kdl/PyKDL/sip/sipPyKDLpart1.cpp: In function ‘void
>>assign_ChainIkSolverVel_pinv_givens(void*, Py_ssize_t, void*)’:
>>python_orocos_kdl/PyKDL/sip/sipPyKDLpart1.cpp:1047:137: error:
>>‘KDL::ChainIkSolverVel_pinv_givens&
>>KDL::ChainIkSolverVel_pinv_givens::operator=(const
>>KDL::ChainIkSolverVel_pinv_givens&)’ is private within this context
>> 1047 |     if (sipIsDerivedClass(sipSelf))
>>
>>Do you have an idea why?
>
>You'll have to send me the relevant .sip files.

Not sure what you need but there is a PR trying to implement this here:

https://github.com/orocos/orocos_kinematics_dynamics/pull/269

>>Also, the assignment operator is already removed by the compiler,
>>having to manually define it private sounds superfluous.
>
>SIP isn't a full C++ parser - it doesn't know that the compiler will 
>delete the operator.

Yeah, I guessed so already.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20200626/07c20671/attachment.sig>


More information about the PyQt mailing list