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

Method contextEnter

tests/pybind11_tests.h:108–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106 static TestContext *createNewContextForInit() { return new TestContext("new-context"); }
107
108 pybind11::object contextEnter() {
109 py::object contextObj = py::cast(*this);
110 return contextObj;
111 }
112 void contextExit(const pybind11::object & /*excType*/,
113 const pybind11::object & /*excVal*/,
114 const pybind11::object & /*excTb*/) {}

Callers

nothing calls this directly

Calls 1

castFunction · 0.70

Tested by

no test coverage detected