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

Method get_function_record

include/pybind11/pybind11.h:2877–2888  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2875 }
2876
2877 static detail::function_record *get_function_record(handle h) {
2878 h = detail::get_function(h);
2879 if (!h) {
2880 return nullptr;
2881 }
2882
2883 handle func_self = PyCFunction_GET_SELF(h.ptr());
2884 if (!func_self) {
2885 throw error_already_set();
2886 }
2887 return detail::function_record_ptr_from_PyObject(func_self.ptr());
2888 }
2889};
2890
2891// Supports easier switching between py::class_<T> and py::class_<T, py::smart_holder>:

Callers

nothing calls this directly

Calls 3

get_functionFunction · 0.85
ptrMethod · 0.80

Tested by

no test coverage detected