Re: [PATCH v2 01/10] hashmap: add usage documentation explaining hashmap_free[_entries]()
- From
Jeff King <peff@peff.net>
- Date
- Nov 3, 2020, 16:26 UTC
- Message-ID
- <20201103162607.GG444466@coredump.intra.peff.net>
- In-Reply-To
- <CABPp-BGdM0tkQgqRQzzpTOyKPoQVLsppK_EUcthAO8LbtzcTNA@mail.gmail.com>
On Fri, Oct 30, 2020 at 12:55:51PM -0700, Elijah Newren wrote:
Show 9 quoted lines
> > But I think in the current scheme that "free" is somewhat overloaded, > > and if we end with a "clear" and a "free" that seems confusing to me. > > Hmm...there are quite a few calls to hashmap_free() and > hashmap_free_entries() throughout the codebase. I'm wondering if I > should make switching these over to your new naming suggestions a > separate follow-on series from this one, so that if there are any > conflicts with other series it doesn't need to hold these first 10 > patches up.
Yeah, it will definitely need a lot of mechanical fix-up. Those kinds of conflicts aren't usually a big deal. Junio will have to resolve them, but if the resolution is easy and mechanical, then it's not likely to hold up either topic.
> If I do that, I could also add a patch to convert several callers of > hashmap_init() to use the new HASHMAP_INIT() macro, and another patch > to convert shortlog to using my strset instead of its own.
Yeah, both would be nice. I'm happy if it comes as part of the series, or separately on top.
-Peff