This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Adding REMOVE action to hsearch


On Thursday 27 June 2013 05:36:05 Bartosz GoÅaszewski wrote:
> 2013/6/26 Mike Frysinger <vapier@gentoo.org>:
> > to be fair, the hashmap implementation is based on the POSIX one:
> >         http://pubs.opengroup.org/onlinepubs/9699919799/functions/hcreate
> >         .html
> 
> I know - POSIX specification was the first thing I looked at, and I am
> aware, that it doesn't require hsearch to allow entry removal, but it
> is mentioned in the 'bugs' section of hsearch's man page and Glibc has
> reentrant versions of hashmap functions anyway (not required by POSIX
> either). Glibc hsearch also updates values for keys already existing
> in the hashtable, which too isn't a POSIX behavior. This is why I
> thought it might be possible to add this feature - it doesn't violate
> the POSIX standard in any way, and without it hashmaps are severely
> limited. Not to mention it would be nice to be able to iterate over
> key-value pairs too (but this is less important, than removing).
> 
> > i would start by browsing the upstream working group to see if anyone has
> > already made a proposal that fits your needs:
> >         http://www.austingroupbugs.net
> 
> I haven't found anything about hsearch/hashmap etc.

the theme is that it's easy to propose an API on their tracker/mailing list 
and get feedback before trying to merge something in glibc.  any standards 
movement before implementation is a good thing.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]