Re: size_t vs "unsigned long"
On Wed, Oct 03, 2007 at 08:30:04PM +0000, Junio C Hamano wrote:
Show 11 quoted lines
> Traditionally, inside git, we have used the length of things
> with "unsigned long" for pretty much anything, except where we
> wanted the length exactly sized we used int32_t, uint64_t and
> friends.
>
> A few places pass pointer to unsigned long as the second
> parameter to strbuf_detach(), triggering type mismatch warnings.
> An easy way out is to change strbuf_detach() to take a pointer
> to ulong but I think it is going backwards. Most places that
> use "unsigned long" can safely be converted (and made more
> correct) to use size_t.
Well, afaict, on every linux archs I know of, unsigned longs and
size_t are the same. Though, I don't know if that holds for the msys
port, and if that does not holds, then a s/unsigned long/size_t/ would
help them. Else, for consistency sake, I believe the change is a good
one.
--
·O· Pierre Habouzit
··O madcoder@debian.org
OOO http://www.madism.org