Displaying 3 results from an estimated 3 matches for "f1d3c62".
2019 Aug 13
0
[PATCH libnbd 2/4] api: Add free function and remove valid_flag parameter.
...cbname cbname cbname;
pr " %s_callback.user_data = malloc (sizeof (value));\n" cbname;
pr " if (%s_callback.user_data == NULL) caml_raise_out_of_memory ();\n"
cbname;
diff --git a/generator/states-reply-simple.c b/generator/states-reply-simple.c
index f1d3c62..7f2775d 100644
--- a/generator/states-reply-simple.c
+++ b/generator/states-reply-simple.c
@@ -64,12 +64,13 @@
int error = 0;
assert (cmd->error == 0);
- if (cmd->cb.fn.chunk.callback (LIBNBD_CALLBACK_VALID|LIBNBD_CALLBACK_FREE,
- cmd-...
2019 Aug 13
0
[PATCH libnbd 1/4] api: Combine callback and user_data into a single struct.
...lobal_root (%s_callback.user_data);\n"
+ cbname
| Enum (n, { enum_prefix }) ->
pr " int %s = %s_val (%sv);\n" n enum_prefix n
| Flags (n, { flag_prefix }) ->
diff --git a/generator/states-reply-simple.c b/generator/states-reply-simple.c
index 9b249ab..f1d3c62 100644
--- a/generator/states-reply-simple.c
+++ b/generator/states-reply-simple.c
@@ -60,16 +60,17 @@
case 0:
/* guaranteed by START */
assert (cmd);
- if (cmd->cb.fn.chunk) {
+ if (cmd->cb.fn.chunk.callback) {
int error = 0;
assert (cmd->error == 0);
-...
2019 Aug 13
8
[PATCH libnbd 0/4] Add free function to callbacks.
Patches 1 & 2 are rather complex, but the end result is that we pass
closures + user_data + free function in single struct parameters as I
described previously in this email:
https://www.redhat.com/archives/libguestfs/2019-August/msg00210.html
Patch 3 adds a convenient FREE_CALLBACK macro which seems a worthwhile
simplification if you buy into 1 & 2.
Patch 4 adds another macro which is