[Libguestfs] [libnbd PATCH] generator: Let nbd_aio_get_direction return unsigned

Richard W.M. Jones rjones at redhat.com
Thu Jul 25 21:24:34 UTC 2019


On Thu, Jul 25, 2019 at 04:11:42PM -0500, Eric Blake wrote:
> @@ -4072,7 +4092,9 @@ let print_python_binding name { args; ret } =
>    );
> 
>    pr "\n";
> -  pr " out:\n";
> +  if may_set_error then (
> +    pr " out:\n"
> +  );

As a point merely of style, you don't need the ( .. ) around the
then-clause if you don't want it (but in that case the pr command must
be followed by a semicolon).

> @@ -4347,6 +4369,7 @@ and ocaml_ret_to_string = function
>    | RInt -> "int"
>    | RInt64 -> "int64"
>    | RString -> "string"
> +  | RUInt -> "int"

New OCaml actually has unsigned types, but we probably don't want to
depend on that version yet so this is OK as it is.

This patch looks fine, can't see any problems, so ACK.

There are a handful of places in tests and examples where we assign
nbd_aio_get_direction to an int variable, usually called ’dir’.  Maybe
we should replace those with unsigned variables?

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW




More information about the Libguestfs mailing list