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

Method handle_of

include/pybind11/pytypes.h:1612–1614  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1610
1611 /// Return a type handle from a handle or an object
1612 static handle handle_of(handle h) {
1613 return handle(reinterpret_cast<PyObject *>(Py_TYPE(h.ptr())));
1614 }
1615
1616 /// Return a type object from a handle or an object
1617 static type of(handle h) { return type(type::handle_of(h), borrowed_t{}); }

Callers

nothing calls this directly

Calls 2

ptrMethod · 0.80
handleFunction · 0.70

Tested by

no test coverage detected