| 2406 | template <typename Derived> |
| 2407 | template <return_value_policy policy, typename... Args> |
| 2408 | object object_api<Derived>::operator()(Args &&...args) const { |
| 2409 | #ifndef NDEBUG |
| 2410 | if (!PyGILState_Check()) { |
| 2411 | pybind11_fail("pybind11::object_api<>::operator() PyGILState_Check() failure."); |
| 2412 | } |
| 2413 | #endif |
| 2414 | return detail::collect_arguments<policy>(std::forward<Args>(args)...).call(derived().ptr()); |
| 2415 | } |
| 2416 | |
| 2417 | template <typename Derived> |
| 2418 | template <return_value_policy policy, typename... Args> |