wrap_c: add capability for client-supplied function to determine cursor inclusion