This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Adding REMOVE action to hsearch
- From: Bartosz Gołaszewski <bartekgola at gmail dot com>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 27 Jun 2013 11:36:05 +0200
- Subject: Re: Adding REMOVE action to hsearch
- References: <CAFdkumj0p7Gg2S7WifH=FMG1oY1OTuso9ue1y3Obv4oLUFc+aA at mail dot gmail dot com> <201306261359 dot 02484 dot vapier at gentoo dot org>
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
> -mike
I haven't found anything about hsearch/hashmap etc.
Best regards,
Bartosz Golaszewski