SIP v4.19.23 adds dependency on assignment operator

Jochen Sprickerhof pyqt at jochen.sprickerhof.de
Fri Jun 26 14:19:57 BST 2020


Hi,

There is a regression in SIP v4.19.23 breaking orocos-kdl:

https://github.com/orocos/orocos_kinematics_dynamics/issues/260

As far as I understand in

https://www.riverbankcomputing.com/hg/sip/rev/22ababb6d14a#l3.63

setCopyHelper() is generated if there is a public copy constructor. In 
addition it is assumed that a valid assignment operator exists as well, as 
stated here:

https://www.riverbankcomputing.com/hg/sip/rev/22ababb6d14a#l1.48

This is not the case for a lot of classes in orocos-kdl because they have a 
reference as a member and so the default assignment operator is deleted.

Could you make this condition explicit, i.e. by checking for the assignment 
operator¹ or revert the implicit dependency? For me this made it work again:

--- a/sipgen/transform.c
+++ b/sipgen/transform.c
@@ -599,7 +599,7 @@ static void checkHelpers(sipSpec *pt, classDef *cd)
          appendToIfaceFileList(&cd->iff->module->used, cd->iff);
      }

-    if (pub_copy_ctor)
+    if (pub_def_ctor && pub_copy_ctor)
      {
          setCopyHelper(cd);
          appendToIfaceFileList(&cd->iff->module->used, cd->iff);

But I'm not sure if that's the best solution.

Cheers Jochen


¹: I had a look at the code, but I'm not sure if and how this would work.
-------------- 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/13432b1f/attachment.sig>


More information about the PyQt mailing list