[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH 1/3] mllib: Fix parsing of integers on the command line and use correct int type.

On Friday, 15 July 2016 22:37:27 CEST Richard W.M. Jones wrote:
> Currently input such as "1ABC" or "1.1" is parsed (as 1).  If there is
> trailing data on the command line, refuse to accept it.
> In addition this parses the integer into a C 'long', which is as close
> as we can get to the OCaml idea of a native int.  This prevents the
> gross rounding error from the earlier code if the integer parameter
> was larger than 32 bits (on a 64 bit platform), but is still not
> completely free of rounding problems because the OCaml type is 31 or
> 63 bits.
> Probably we should have explicit 'int32' and 'int64' types in the
> OCaml code, instead of using (native) 'int'.
> ---

Ops, apologies, this should have been correct when sending the initial
Getopt patch -- sending the fix I have locally here for few days.

Pino Toscano

Attachment: signature.asc
Description: This is a digitally signed message part.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]