Jim Meyering wrote: > Jim Meyering wrote: > >> Here's a proposed change to rename/deprecate a function in hash.c that >> was so poorly named (by me!) that it was harder than necessary to use. >> AFAICS (google, codesearch), the only existing use is in di-set.c, >> and I've adjusted that. >> >> While I've deprecated the offending function, hash_insert0, given that >> there are no other users, removing it altogether might be better. >> Opinions? > ...
I went ahead and pushed it. Opinions still welcome, of course. >> Subject: [PATCH] hash: deprecate poorly-named hash_insert0: use >> hash_insert_if_absent > > Actually I updated NEWS, but had not folded in that part of the change. > Here's the full c-set: > >>From 57abafb714cb0daf2bdee9a19b374fbb573d8bb6 Mon Sep 17 00:00:00 2001 > From: Jim Meyering <meyer...@redhat.com> > Date: Fri, 18 Nov 2011 12:09:16 +0100 > Subject: [PATCH] hash: deprecate poorly-named hash_insert0: use > hash_insert_if_absent > > * lib/hash.c (hash_insert_if_absent): Rename from hash_insert0. > Add a sentence to the comment. > (hash_insert0): New function that simply calls hash_insert_if_absent. > * lib/hash.h (hash_insert_if_absent): Declare it. > (hash_insert0): Add deprecation attribute. > (_GL_ATTRIBUTE_DEPRECATED): Define. > * lib/di-set.c (di_set_insert): Use hash_insert_if_absent, > not hash_insert0. > * NEWS: Mention it, even though it's not really an incompatible change > Prompted by a question from Matthew Booth <mbo...@redhat.com>.