Re: [PATCH 00/14] numparse module: systematically tighten up integer parsing

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

 



Michael Haggerty <mhagger@xxxxxxxxxxxx> writes:

[jc: dropped a non-working address from Cc list]

> I wasn't aware of strtonum; thanks for the reference. It has an
> untraditional interface. Their willingness to sacrifice half of the
> unsigned range and requirement that the user specify minval and maxval
> have the nice effect of permitting one function to be used for all
> integer types.
> ...
> I think git will need more flexibility, for example to support other
> radixes and to allow trailing characters. So personally I don't think we
> should use (or imitate) strtonum().

I had the same impression.  An earlier suggestion by Peff about
uintmax_t may be something we might want to keep in mind; we might
want to use strtoll/strtoull as the underlying implementation if we
wanted to avoid rolling our own.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]