[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: A new look at the apr_off_t problem

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2004-01-24 00:50:25 CET

On Fri, 2004-01-23 at 18:37, Branko ibej wrote:
> Why does it use a file-offset type for a line-number parameter? That's
> utter nonsense. It should simply use apr_uint32_t; after all, "svn
> blame" (as currently implemented) is only useful for text files, and I'l
> like to see the genius who can keep track of more than 4 billion lines
> of text. I don't think even a Greek demi-god hero could handle that.

It introduces a type-narrowing problem to use a smaller type for line
number than for file offsets. >4B line text files may not be a
practical problem on the same timescale as >4B bytes files, but there
are fewer corner cases to worry about if we use a type which is at least
as big.

> And if, for some obscure reason, 4 gig isn't enough, just use
> svn_filesize_t. I can't imagine blame needing negative line numbers.

I'd be fine with that.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jan 24 00:51:03 2004

This is an archived mail posted to the Subversion Dev mailing list.