From: Junio C Hamano Date: Wed, 25 Mar 2015 21:59:11 GMT Subject: Re: [PATCH 00/14] numparse module: systematically tighten up integer parsing Message-ID: In-Reply-To: <5513252A.7050601@alum.mit.edu> Michael Haggerty 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.