You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Roy T. Fielding" <fi...@kiwi.ICS.UCI.EDU> on 1997/05/06 02:06:59 UTC

Re: 64-bit clean and 1.2b10

>I submitted a 64 bit patch but it was shot down because the programming
>style sucked.  I agree mostly, but not entirely.  I think the best
>solution *is* to use something like ptrdiff_t when we want an object that
>can be an int or a pointer.  I hate unions, I ranted about their
>performance penalty when passed as arguments.

I wouldn't pass the union as an argument -- I'd do a cast before placing
in the save-table, and after retrieving from the save-table. That work
is done inside the functions that are doing the saves/retrieves and
should never impact the interface (return value and parameters).
The alternative is to simply use two separate pools -- one for fds
and the other for pointers.  Both of these are better than trying
to guess which is the larger of two types and messing-up the interface.

.....Roy