| 2355 | }; |
| 2356 | |
| 2357 | class function : public object { |
| 2358 | public: |
| 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 | |
| 2370 | class staticmethod : public object { |
| 2371 | public: |
no outgoing calls