Displaying 2 results from an estimated 2 matches for "s_all".
Did you mean:
p_all
2019 Aug 10
0
[PATCH libnbd 8/9] generator: Enhance Flags/OFlags with optional "all flags" mask.
...let flag = sprintf "LIBNBD_%s_%s" flag_prefix flag in
pr "#define %-40s %d\n" flag i
) flags;
- pr "\n"
+ if all_flags_bitmask then (
+ let all = List.fold_left (lor) 0 (List.map snd flags) in
+ let n = sprintf "LIBNBD_%s_ALL" flag_prefix in
+ pr "#define %-40s %d\n" n all;
+ );
+ pr "\n";
) all_flags;
List.iter (
fun (n, i) ->
@@ -4606,12 +4613,17 @@ Error.__str__ = _str
pr "\n"
) all_enums;
List.iter (
- fun { flag_prefix; flags } ->...
2019 Aug 10
17
[PATCH libnbd 0/9] Add Enum and Flags types.
This largish series adds several new features to the generator.
Enum maps to enumerated types (like enum in C). The only current use
for this is replacing the nbd_set_tls (nbd, 0/1/2) parameter with
LIBNBD_TLS_DISABLE, LIBNBD_TLS_ALLOW, LIBNBD_TLS_REQUIRE (and natural
equivalents in other programming languages).
Flags maps to any uint32_t bitmask. It is basically a non-optional,
generalized variation on OFlags with some nice features.
Two commits also add checking so that we check that the Enum, Flags or
OFlags parameters do...