apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@apache.org>
Subject Re: cvs commit: apr/tables apr_hash.c
Date Wed, 25 Dec 2002 23:38:27 GMT
At 04:00 PM 12/23/2002, Tony Finch wrote:
>On Mon, Dec 23, 2002 at 08:41:17PM -0000, jerenkrantz@apache.org wrote:
>> 
>>   Allow apr_hash to have greater than int number of elements.
>>   (serf_spider needs a ridiculously large hash table.)
>>   
>>   -APR_DECLARE(int) apr_hash_count(apr_hash_t *ht);
>>   +APR_DECLARE(apr_size_t) apr_hash_count(apr_hash_t *ht);
>
>Gosh, does APR really support machines where int is less than 32 bits?

No, (although we might even be able to.)  You are seeing the the distiction
between P64, LP64 and ILP64 architectures.

Win64, and some mainframe unicies support 64 bit pointers, while ints
remain 32 bits.  size_t obviously corresponds to a size 0 <= n <= MAX_PTR.

So we need to distinguish between pointer math ints (apr_size_t, apr_ssize_t)
and file size ints (apr_off_t) and general purpose math ints.

Bill


Mime
View raw message