Quoting André Malo <[EMAIL PROTECTED]>:

> * [EMAIL PROTECTED] wrote:
> 
> > Quoting André Malo <[EMAIL PROTECTED]>:
> > 
> > > * André Malo <[EMAIL PROTECTED]> wrote:
> > > 
> > > >  APR_DECLARE(apr_hash_t *) apr_hash_make_custom(apr_pool_t *pool,
> > > >                                                 apr_hashfunc_t
> > > >                                                 hash_func)
> > > 
> > > Additionally hash_func should be a pointer (also in declaration in in
> the
> > > hash
> > > struct), shouldn't it?
> > 
> > It is a pointer.  Look at the definition:
> > 
> > typedef unsigned int (*apr_hashfunc_t)(const char *key, apr_ssize_t
> *klen);
> 
> oh well. Though I don't find that pointer hiding not very intuitive (you've
> just seen the problem live ;-).
> 
> typedef unsigned int apr_hashfunc_t(const char *key, apr_ssize_t *klen);
> 
> would be better readable (to me).

I've never seen function pointer types defined that way.  The biggest problem is
that this type can't be used without a * in front of the variable.  Not a big
deal, but it does make the type less usefull.  Also, the current definition is
how all of the existing function pointers are defined in both APR and APR-util.
 Feel free to change it if you want though.

Ryan


Reply via email to