Upcalls: use C++ style (std::function/std::bind) instead of C function pointers.