Re: [PATCH 00/10] Friday night special: hash map cleanup
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 5, 2017, 20:51 UTC
- Message-ID
- <xmqqmv8ihaj7.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20170701002838.22785-1-sbeller@google.com>
Stefan Beller <sbeller@google.com> writes:
Show 11 quoted lines
> This goes on top of sb/hashmap-customize-comparison. > No functional impact but a pure cleanup series: > No casts to hashmap_cmp_fn in the whole code base any more. > > This revealed another interesting thing, which is not a bug per se: > The const correctness of hashmap_cmp_fn as it requires all its void > pointers to be const! > > We violate this in patch-ids.c as we modify the `fndata` at some > uncritical part (a part that doesn't change the equal-functionality > AFAICT).
I am undecided, but perhaps we should loosen that, if some real-world user has a legitimate need to take a mutable fndata?
I dunno. The patches look good to me.
Thanks.