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

Re: Yet another look at the apr_off_t problem

From: Ben Reser <ben_at_reser.org>
Date: 2004-01-24 17:02:34 CET

On Sat, Jan 24, 2004 at 03:32:36PM +0000, Julian Foad wrote:
> I understand the explanation that has been given for why the current
> "apr_off_t" is unsuitable for use in a library API, but I am not completely
> familiar with library API/ABI design issues. The use of "apr_uint64_t" to
> hold a line number seems to me very ugly. A line number is not logically a
> 64-bit type, it is an unbounded type. Interfaces within an application are
> normally best written with plain "int". If "int" is not big enough for
> someone's line numbers, then they almost certainly need a bigger computer
> (one which is natively 64-bit or 128-bit).
> Is there an ABI-related reason not to use plain "int" in library APIs? If
> so, what about our several other APIs that already use plain "int"?

Nope a line number is not an unbound type. It is limited to the maximum
number of characters in a file (as long as you start numbering with 0).
The maximum sized apr_off_t and the maximum file size we support is an
int64, which is why we are using an apr_int64_t for this type here (not
apr_uint64_t which was used in earlier versions and bliss convinced me
it was unnecessary and bad).

Ben Reser <ben@reser.org>
"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jan 24 17:03:10 2004

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