Cliff Woolley <[EMAIL PROTECTED]> writes:
> On 8 Dec 2001, Jeff Trawick wrote:
>
> > Why isn't it const void * instead of const char *? I'm trying to pass
> > unsigned char * into apr_bucket_foo_create() and I have to cast. It
> > seems so clear that it should be const void * (but maybe I need more
> > caffeine).
>
> If that changes, apr_bucket_read() would have to change, too.
The problem with linking the types of the two together is the thing
with C and **. Practically every caller of apr_bucket_read() would
end up needing to cast (and possibly mishandle the const-ness in
doing so). That is massive suckage.
AFAICT, the least pain for API users is for apr_bucket_read() to
remain the same and for apr_bucket_foo_create() to take void *.
I don't have any other rationalization for the discrepancy (const void
* vs. const char **) :)
--
Jeff Trawick | [EMAIL PROTECTED] | PGP public key at web site:
http://www.geocities.com/SiliconValley/Park/9289/
Born in Roswell... married an alien...