search for: a18d581

Displaying 2 results from an estimated 2 matches for "a18d581".

Did you mean: 18.581
2019 Aug 15
0
[PATCH libnbd v2 02/10] lib: Add macros to check if a callback is "null" or not, and set it to null.
...const char *fs, ...) if (r == -1) goto out; - if (h->debug_callback.callback) + if (CALLBACK_IS_NOT_NULL (h->debug_callback)) /* ignore return value */ CALL_CALLBACK (h->debug_callback, context, msg); else diff --git a/lib/internal.h b/lib/internal.h index dc3676a..a18d581 100644 --- a/lib/internal.h +++ b/lib/internal.h @@ -273,6 +273,11 @@ struct command { uint32_t error; /* Local errno value */ }; +/* Test if a callback is "null" or not, and set it to null. */ +#define CALLBACK_IS_NULL(cb) ((cb).callback == NULL) +#define CALLBACK_IS_NOT_NULL(c...
2019 Aug 15
13
[PATCH libnbd v2 00/10] Callbacks and OCaml and Python persistent buffers.
This is a combination of these two earlier series: https://www.redhat.com/archives/libguestfs/2019-August/msg00235.html https://www.redhat.com/archives/libguestfs/2019-August/msg00240.html plus changes to allow .callback = NULL / .free != NULL, and to reduce the complexity of freeing callbacks. Although it's rather long there's nothing complex here. We might consider squashing some