mirror of
https://github.com/RYDE-WORK/pybind11.git
synced 2026-01-20 13:43:27 +08:00
This fixes #856. Instead of the weakref trick, the internals structure holds an unordered_map from PyObject* to a vector of references. To avoid the cost of the unordered_map lookup for objects that don't have any keep_alive patients, a flag is added to each instance to indicate whether there is anything to do.