Re: [PATCH 1/2] hashmap.h: compare function has access to a data field

2017-06-30 Thread Junio C Hamano
Stefan Beller writes: > Yes it was a last minute squash before sending it out, as the fix was only > two lines whereas the conversion is a lot. If it were separated I could have > claimed the introduction to be a rather mechanical patch, but I did not > make use of coccinelle or such, so the like

Re: [PATCH 1/2] hashmap.h: compare function has access to a data field

2017-06-29 Thread Stefan Beller
On Thu, Jun 29, 2017 at 11:11 AM, Junio C Hamano wrote: > Junio C Hamano writes: > >> I haven't looked at the use of keydata in patch-ids.c and friends to >> decide if that "abuse" claim is correct; if it were the case, should >> we expect that a follow-up patch to clean up the existing mess by >

Re: [PATCH 1/2] hashmap.h: compare function has access to a data field

2017-06-29 Thread Junio C Hamano
Junio C Hamano writes: > I haven't looked at the use of keydata in patch-ids.c and friends to > decide if that "abuse" claim is correct; if it were the case, should > we expect that a follow-up patch to clean up the existing mess by > using the new mechanism? Or does fixing the "abuse" take anot

Re: [PATCH 1/2] hashmap.h: compare function has access to a data field

2017-06-29 Thread Junio C Hamano
Stefan Beller writes: > When using the hashmap a common need is to have access to arbitrary data > in the compare function. A couple of times we abuse the keydata field > to pass in the data needed. This happens for example in patch-ids.c. It is not "arbitrary data"; it is very important to stre

[PATCH 1/2] hashmap.h: compare function has access to a data field

2017-06-28 Thread Stefan Beller
When using the hashmap a common need is to have access to arbitrary data in the compare function. A couple of times we abuse the keydata field to pass in the data needed. This happens for example in patch-ids.c. This patch changes the function signature of the compare function to have one more voi