[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: APR patch: No function to return # of keys...

From: Greg Stein <gstein_at_lyra.org>
Date: 2001-01-11 09:40:43 CET

Changed and checked in.

Cheers,
-g

On Wed, Jan 10, 2001 at 05:09:01PM -0800, Bill Tutt wrote:
> Probably force of habit more than anything else. COM functions always have
> outgoing parameters, as the return value is always an HRESULT. :)
>
> Feel free to fix,
> Bill
>
> -----Original Message-----
> From: Branko Cibej [mailto:brane@xbc.nu]
> Sent: Wednesday, January 10, 2001 5:00 PM
> To: 'dev@subversion.tigris.org'
> Subject: Re: APR patch: No function to return # of keys...
>
> Bill Tutt wrote:
>
> > +/**
> > + * Get the number of keys in the hash table.
> > + * @param ht The hash table
> > + * @param count Return pointer for the number of keys
> > + * @deffunc void apr_hash_count(apr_hash_t *ht, apr_size_t *count);
> > + */
> > +APR_DECLARE(void) apr_hash_count(apr_hash_t *ht, apr_size_t *count);
>
> Just curious: Why use an output parameter, instead of the return value?
> Shouldn't the prototype be
>
> apr_size_t apr_hash_count(apr_hash_t *ht)
> ?
>
> --
> Brane Cibej
> home: <brane_at_xbc.nu> http://www.xbc.nu/brane/
> work: <branko.cibej_at_hermes.si> http://www.hermes-softlab.com/
> ACM: <brane_at_acm.org> http://www.acm.org/

-- 
Greg Stein, http://www.lyra.org/
Received on Sat Oct 21 14:36:19 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.