pybind11/include
Ralf W. Grosse-Kunstleve 964c49978f
Minor py::capsule cleanup. No functional change. (#4238)
Use `PyCapsule_Destructor` (part of the stable Python ABI) instead of spelling out the C `typedef`.

The deprecation message is misleading. Replace with a message pointing to another existing ctor.

Background: According to @wjakob the original motivation for deprecating the ctor (in PR #752) was to hide Python C API details, but PR #902 brought those back with a new ctor, it cannot be avoided. Having a `PyCapsule_Destructor` or a `void (*destructor)(void *)` are two separate and valid use cases.
2022-10-12 15:43:43 -07:00
..
pybind11 Minor py::capsule cleanup. No functional change. (#4238) 2022-10-12 15:43:43 -07:00