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

Function cast

include/pybind11/pytypes.h:1116–1118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1114 PyObject *ptr() const { return get_cache().ptr(); }
1115 template <typename T>
1116 T cast() const {
1117 return get_cache().template cast<T>();
1118 }
1119
1120private:
1121 static object ensure_object(object &&o) { return std::move(o); }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected