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

Method cpp_function

include/pybind11/pytypes.h:2360–2366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2358public:
2359 PYBIND11_OBJECT_DEFAULT(function, object, PyCallable_Check)
2360 handle cpp_function() const {
2361 handle fun = detail::get_function(m_ptr);
2362 if (fun && PyCFunction_Check(fun.ptr())) {
2363 return fun;
2364 }
2365 return handle();
2366 }
2367 bool is_cpp_function() const { return (bool) cpp_function(); }
2368};
2369

Callers 1

loadMethod · 0.45

Calls 3

get_functionFunction · 0.85
ptrMethod · 0.80
handleFunction · 0.70

Tested by

no test coverage detected