Stefan Beller <sbeller@xxxxxxxxxx> writes: > Originally I wanted to do that, see prep work in [1], but Jeff explained that > the additional pointer in the compare function is **not** supposed to be > a additional payload (such as the diff options specifying the white space > options.) > > [1] https://public-inbox.org/git/20170512200244.25245-1-sbeller@xxxxxxxxxx/ Ah, yes, keydata is a wrong thing to use to give additional hint to the eqv function. We do need to fix the function signature of hashmap_cmp_fn. It is common for us to want to use a single implementation of an eqv function that can be configured to behave slightly differently but the customization will stay the same throughout the lifetime of a hashmap. IOW, hashmap_init() needs to be able to take a pointer to such a configuration data (e.g. diff_options), and then the comparison made between two elements that hash to the same bucket needs to be given not just the two elements but also that configuration data to tweak the function.