apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: cvs commit: apr/include apr_hash.h
Date Mon, 13 Jan 2003 20:01:51 GMT
At 01:18 PM 1/13/2003, Justin Erenkrantz wrote:
>--On Monday, January 13, 2003 6:52 PM +0000 wrowe@apache.org wrote:
>>wrowe       2003/01/13 10:52:07
>>  Modified:    tables   apr_hash.c
>>               include  apr_hash.h
>>  Log:
>>    A binary-safe patch that satisfies Jerenkrantz's original
>>desire for     more elements, but structured such that we still use
>>the optimal platform     element indexes (a machine int is
>>generally faster than a fractional int).
>Um, apr_uint32_t is unsigned int.

Which is why the patch transformed them into unsigned int's... the size
remains the same on 64 bit CPUs, and since sizeof(int) == sizeof(unsigned int)
we shouldn't have problems with older builds.

>  Actually, I wonder what would happen when sizeof(int) isn't 4 on a Unix system.  APR's
configure would produce an invalid apr.h.

How do you mean?  Are unicies 64 LP architectures?  I'm fairly certain we
can find 64 ILP architectures, so we better use caution here.

>It also seems to be common to use apr_uint32_t for indexes (see apr_allocator.h).  --

Irrelevant, we didn't change that size after we incorporated it, so choosing
apr_unit32_t didn't harm anything.  Those are private values.  For performance 
reasons perhaps we should change it to unsigned int in APR 1.0, but that's 
something to chew on for the future, not for the 0.9 branch.


View raw message