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

Method current

include/pybind11/subinterpreter.h:200–205  ·  view source on GitHub ↗

Get a non-owning wrapper of the currently active interpreter (if any)

Source from the content-addressed store, hash-verified

198
199 /// Get a non-owning wrapper of the currently active interpreter (if any)
200 static subinterpreter current() {
201 subinterpreter c;
202 c.istate_ = detail::get_interpreter_state_unchecked();
203 c.disarm(); // make destruct a noop, we don't own this...
204 return c;
205 }
206
207 /// Get the numerical identifier for the sub-interpreter
208 int64_t id() const {

Callers

nothing calls this directly

Calls 2

disarmMethod · 0.45

Tested by

no test coverage detected