• Jason Rhinelander's avatar
    functional: support bound methods · a01b6b80
    Jason Rhinelander authored
    If a bound std::function is invoked with a bound method, the implicit
    bound self is lost because we use `detail::get_function` to unbox the
    function.  This commit amends the code to use py::function and only
    unboxes in the special is-really-a-c-function case.  This makes bound
    methods stay bound rather than unbinding them by forcing extraction of
    the c function.
    a01b6b80
test_callbacks.cpp 5.69 KB