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

Re: APR hash tables, restated

From: Karl Fogel <kfogel_at_galois.collab.net>
Date: 2000-10-13 20:50:05 CEST

Jim Blandy <jimb@savonarola.red-bean.com> writes:
> Here's a simpler restatement of my concern about null keys:
>
> I'd like to use APR hash tables to hash arbitrary binary objects. For
> example, in the filesystem, I use APR hash tables for a node cache,
> which is indexed by node ID's; a node ID is an array of integers. If
> you can see that it's handy to take arbitrary objects and hash on
> them, then you can certainly imagine that some of these objects might have
> the empty byte string as a valid entity.
>
> But at the moment, APR hash tables can't distinguish between the empty
> byte string and the byte string containing one zero byte. They're
> both treated as equivalent keys. It's kind of screwey.

Yeah, still problematic for binary data...

For empty strings (filenames) things just happen to work out okay.
Received on Sat Oct 21 14:36:11 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.