Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix tests built with PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 5 Jan 2023 15:44:08 +0000 (16:44 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 5 Jan 2023 15:48:17 +0000 (16:48 +0100)
There was more (hidden) calls to inc_ref/dec_ref while the GIL was not held.

All of them are lambdas used as callbacks with a captured py::object.
As a workaround, the reference counter is increased before releasing the GIL,
and the lambda simply captures the raw pointers.

For more details, see the release notes for pybind11 versions 2.10.2, 2.10.3,
and the future 2.11.


No differences found