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

Re: property code cleanup

From: Greg Stein <gstein_at_lyra.org>
Date: 2001-11-06 22:23:28 CET

On Tue, Nov 06, 2001 at 02:06:35PM -0600, Karl Fogel wrote:
> Greg Stein <gstein@lyra.org> writes:
> > Quick comment: there is *no* reason to ever use apr_table_t in our code.
> >
> > We should always be using an apr_hash_t.
>
> Personally, I'm not going to remember this by rote, but I will
> remember it if you explain *why*. :-)

apr_table_t is a legacy type. Its basic characteristics are like a hash
table (mapping keys to values). However, the keys/values can *only* be
null-term strings. Multiple values are allowed, so it isn't *quite* a hash
table. The keys are case insensitive. And lastly, they are O(#keys) on most
operations.

In almost every case, when somebody uses an apr_table_t, they really meant
to use an apr_hash_t.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:48 2006

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