MCPcopy Create free account
hub / github.com/pybind/pybind11 / unsafe_reset_local_internals

Function unsafe_reset_local_internals

tests/test_with_catch/external_module.cpp:12–18  ·  view source on GitHub ↗

Compare unsafe_reset_internals_for_single_interpreter in test_subinterpreter.cpp.

Source from the content-addressed store, hash-verified

10// Compare unsafe_reset_internals_for_single_interpreter in
11// test_subinterpreter.cpp.
12void unsafe_reset_local_internals() {
13 // NOTE: This code is NOT SAFE unless the caller guarantees no other threads are alive
14 // NOTE: This code is tied to the precise implementation of the internals holder
15
16 py::detail::get_local_internals_pp_manager().unref();
17 py::detail::get_local_internals();
18}
19} // namespace
20
21PYBIND11_MODULE(external_module,

Callers 1

PYBIND11_MODULEFunction · 0.85

Calls 1

unrefMethod · 0.80

Tested by

no test coverage detected