SIP v4.19.23 adds dependency on assignment operator

Jochen Sprickerhof <[email protected]> Fri, 26 Jun 2020 15:19:57 +0200
Newsgroups gmane.comp.python.pyqt-pykde
Message-ID <[email protected]>
--r5Pyd7+fXNt84Ff3
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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=20
addition it is assumed that a valid assignment operator exists as well, as=
=20
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=
=20
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=
=20
operator=C2=B9 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


=C2=B9: I had a look at the code, but I'm not sure if and how this would wo=
rk.

--r5Pyd7+fXNt84Ff3
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEc7KZy9TurdzAF+h6W//cwljmlDMFAl719foACgkQW//cwljm
lDMChA/8CyH4iRssdAPerSExLP3Yq7ijIz5d8iG/KCSd4qusQlh0enJ0PDBkSoPO
N2s2wqkGTKn5GrBYp0X0jiEI2Ot5RG7SpK3W1V7GmMbpZQkHAwZHwmlGLRm4EE3O
ylkfuH/M0LfErjEJiDiHAusdQgF5TJYUX4ri16ADHxDQPM5cBL8DKrcMy3kQk5jT
IE3O3EcRQvfRBxeV6NjojEoInZ3nQhv/X4e42B6ZTb0d4mFrcHch1S059TVFmaPL
2nBLCGgmpW5PrkKORbgFfVIBUQ3O3WB4So11qdFOm8VHILkpFQuW2PdqMy/orXAW
o6NsheXt/MdH/idzabkANedaxJ6HbGaQotBRVeqWU2/pqoICKcj/S1wLNpji1PtE
IPXcoOsWVON899euIQVaUMPZn+wM2Os1pGx1OkHYNQ8LtfK+cGFwp+qJz99OZ03G
ZGtScuaFmYPqhhmnLwB6zGcz+eE2ZRVwr+TDAADw04fHteh00nJU8rMy7S9hsPa7
RPhqbleC4ZtFs9bAcxIXCmneH+QBrdpAL0+QBE4Iz+Cz0OoEkkZ8GUqibEtmmj0d
VB5hA+hvTd9em2jxNi89G6andoryRupKIimraNgd8vBm6V9h2/WITxJPPpj0gbWW
WDLnBANKFTWCUhtRy2syumKvEnANd4GgXxlteMrbUTo98F9qXJk=
=o3Zh
-----END PGP SIGNATURE-----

--r5Pyd7+fXNt84Ff3--