| 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>: |
nothing calls this directly
no test coverage detected