Re: [PATCH] hashmap: hashmap_get_next passes through keydata as well

2017-05-16 Thread Jeff King
On Sat, May 13, 2017 at 07:06:35AM -0700, Stefan Beller wrote: > > I think I figured it out, but I have a feeling it is violating the > > intent of the "keydata" parameter. That parameter is typically used not > > as a pointer to arbitrary auxiliary data, but as a trick for finding a > > hash ent

Re: [PATCH] hashmap: hashmap_get_next passes through keydata as well

2017-05-13 Thread Stefan Beller
On Sat, May 13, 2017 at 1:50 AM, Jeff King wrote: > On Fri, May 12, 2017 at 01:02:44PM -0700, Stefan Beller wrote: > >> The 'keydata' may be of value in the underlying compare function to decide >> if the given two entries are the same. > > I had to scratch my head over this for a minute, because

Re: [PATCH] hashmap: hashmap_get_next passes through keydata as well

2017-05-13 Thread Jeff King
On Fri, May 12, 2017 at 01:02:44PM -0700, Stefan Beller wrote: > The 'keydata' may be of value in the underlying compare function to decide > if the given two entries are the same. I had to scratch my head over this for a minute, because there isn't really any motivating example of what you're tr

[PATCH] hashmap: hashmap_get_next passes through keydata as well

2017-05-12 Thread Stefan Beller
The 'keydata' may be of value in the underlying compare function to decide if the given two entries are the same. Signed-off-by: Stefan Beller --- Documentation/technical/api-hashmap.txt | 6 -- diffcore-rename.c | 2 +- hashmap.c | 5 +++--