[Libguestfs] [PATCH libnbd 0/9] Add Enum and Flags types.

Richard W.M. Jones
2019-08-10T13:02:39Z

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 don't contain values which are invalid at the time
of compilation.  This breaks new caller / old DLL at runtime (which
may not be a bad thing).

Note that at least patch #9 and maybe even #7 and #8 are mainly being
posted for discussion.

Rich.