On 8/13/19 5:06 AM, Richard W.M. Jones wrote:
This doesn't change the C API, except that it is now permitted to pass NULL, NULL for the completion callback. For the Python and OCaml APIs the parameter changes to be an optional parameter.
As mentioned elsewhere in this series, we probably want to move nbd_set_debug_callback to take an OClosure as well, to preserve pre-series behavior of allowing a NULL fn to revert back to the default debug handler.
@@ -1874,9 +1873,8 @@ documented in C<nbd_pread_structured>."; "aio_pread_structured_callback", { default_call with args = [ BytesPersistOut ("buf", "count"); UInt64 "offset"; - Closure chunk_closure; - Closure completion_closure ]; - optargs = [ OFlags ("flags", cmd_flags) ]; + Closure chunk_closure ]; + optargs = [ OClosure completion_closure; OFlags ("flags", cmd_flags) ];
If we are too bothered by the inconsistency mentioned in patch 1 (in that all closure names are fixed globally), we would rewrite this to optargs = [ OClosure ("completion", completion_closure); OFlags ("flags", cmd_flags) ]; but I'm fine with what you have. ACK. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org