<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/hashmap.c, branch v2.26.0-rc2</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v2.26.0-rc2</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v2.26.0-rc2'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2019-11-10T07:00:54Z</updated>
<entry>
<title>Fix spelling errors in code comments</title>
<updated>2019-11-10T07:00:54Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2019-11-05T17:07:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=15beaaa3d1f6b555900446deb5e376b4f806d734'/>
<id>urn:sha1:15beaaa3d1f6b555900446deb5e376b4f806d734</id>
<content type='text'>
Reported-by: Jens Schleusener &lt;Jens.Schleusener@fossies.org&gt;
Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>hashmap: remove type arg from hashmap_{get,put,remove}_entry</title>
<updated>2019-10-07T01:20:12Z</updated>
<author>
<name>Eric Wong</name>
<email>e@80x24.org</email>
</author>
<published>2019-10-06T23:30:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=404ab78e39fc74c4eb604b6003642ed264f687a6'/>
<id>urn:sha1:404ab78e39fc74c4eb604b6003642ed264f687a6</id>
<content type='text'>
Since these macros already take a `keyvar' pointer of a known type,
we can rely on OFFSETOF_VAR to get the correct offset without
relying on non-portable `__typeof__' and `offsetof'.

Argument order is also rearranged, so `keyvar' and `member' are
sequential as they are used as: `keyvar-&gt;member'

Signed-off-by: Eric Wong &lt;e@80x24.org&gt;
Reviewed-by: Derrick Stolee &lt;stolee@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>hashmap: introduce hashmap_free_entries</title>
<updated>2019-10-07T01:20:11Z</updated>
<author>
<name>Eric Wong</name>
<email>e@80x24.org</email>
</author>
<published>2019-10-06T23:30:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=c8e424c9c94d97b18cd335be17f32a8ce94a5b7f'/>
<id>urn:sha1:c8e424c9c94d97b18cd335be17f32a8ce94a5b7f</id>
<content type='text'>
`hashmap_free_entries' behaves like `container_of' and passes
the offset of the hashmap_entry struct to the internal
`hashmap_free_' function, allowing the function to free any
struct pointer regardless of where the hashmap_entry field
is located.

`hashmap_free' no longer takes any arguments aside from
the hashmap itself.

Signed-off-by: Eric Wong &lt;e@80x24.org&gt;
Reviewed-by: Derrick Stolee &lt;stolee@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>hashmap: hashmap_{put,remove} return hashmap_entry *</title>
<updated>2019-10-07T01:20:11Z</updated>
<author>
<name>Eric Wong</name>
<email>e@80x24.org</email>
</author>
<published>2019-10-06T23:30:39Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=8a973d0bb398d6d83d6c048acecc750d01bd7234'/>
<id>urn:sha1:8a973d0bb398d6d83d6c048acecc750d01bd7234</id>
<content type='text'>
And add *_entry variants to perform container_of as necessary
to simplify most callers.

Signed-off-by: Eric Wong &lt;e@80x24.org&gt;
Reviewed-by: Derrick Stolee &lt;stolee@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>hashmap: use *_entry APIs for iteration</title>
<updated>2019-10-07T01:20:11Z</updated>
<author>
<name>Eric Wong</name>
<email>e@80x24.org</email>
</author>
<published>2019-10-06T23:30:38Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=87571c3f71ba41d89eef5202f8589daa26f984ca'/>
<id>urn:sha1:87571c3f71ba41d89eef5202f8589daa26f984ca</id>
<content type='text'>
Inspired by list_for_each_entry in the Linux kernel.
Once again, these are somewhat compromised usability-wise
by compilers lacking __typeof__ support.

Signed-off-by: Eric Wong &lt;e@80x24.org&gt;
Reviewed-by: Derrick Stolee &lt;stolee@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>hashmap_cmp_fn takes hashmap_entry params</title>
<updated>2019-10-07T01:20:11Z</updated>
<author>
<name>Eric Wong</name>
<email>e@80x24.org</email>
</author>
<published>2019-10-06T23:30:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=939af16eac1608766273d3971598dbcc4fe09928'/>
<id>urn:sha1:939af16eac1608766273d3971598dbcc4fe09928</id>
<content type='text'>
Another step in eliminating the requirement of hashmap_entry
being the first member of a struct.

Signed-off-by: Eric Wong &lt;e@80x24.org&gt;
Reviewed-by: Derrick Stolee &lt;stolee@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>hashmap_get{,_from_hash} return "struct hashmap_entry *"</title>
<updated>2019-10-07T01:20:11Z</updated>
<author>
<name>Eric Wong</name>
<email>e@80x24.org</email>
</author>
<published>2019-10-06T23:30:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=f23a465132a22860684ac66052cf9a954a18e27d'/>
<id>urn:sha1:f23a465132a22860684ac66052cf9a954a18e27d</id>
<content type='text'>
Update callers to use hashmap_get_entry, hashmap_get_entry_from_hash
or container_of as appropriate.

This is another step towards eliminating the requirement of
hashmap_entry being the first field in a struct.

Signed-off-by: Eric Wong &lt;e@80x24.org&gt;
Reviewed-by: Derrick Stolee &lt;stolee@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>hashmap_get_next returns "struct hashmap_entry *"</title>
<updated>2019-10-07T01:20:10Z</updated>
<author>
<name>Eric Wong</name>
<email>e@80x24.org</email>
</author>
<published>2019-10-06T23:30:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=6bcbdfb277bdc81b5ad6996b3fb005382a35c2ee'/>
<id>urn:sha1:6bcbdfb277bdc81b5ad6996b3fb005382a35c2ee</id>
<content type='text'>
This is a step towards removing the requirement for
hashmap_entry being the first field of a struct.

Signed-off-by: Eric Wong &lt;e@80x24.org&gt;
Reviewed-by: Derrick Stolee &lt;stolee@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>hashmap_put takes "struct hashmap_entry *"</title>
<updated>2019-10-07T01:20:10Z</updated>
<author>
<name>Eric Wong</name>
<email>e@80x24.org</email>
</author>
<published>2019-10-06T23:30:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=26b455f21ed7e0c7b0e4e4e69b5ae48545597020'/>
<id>urn:sha1:26b455f21ed7e0c7b0e4e4e69b5ae48545597020</id>
<content type='text'>
This is less error-prone than "void *" as the compiler now
detects invalid types being passed.

Signed-off-by: Eric Wong &lt;e@80x24.org&gt;
Reviewed-by: Derrick Stolee &lt;stolee@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>hashmap_remove takes "const struct hashmap_entry *"</title>
<updated>2019-10-07T01:20:10Z</updated>
<author>
<name>Eric Wong</name>
<email>e@80x24.org</email>
</author>
<published>2019-10-06T23:30:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=28ee7941280828f9e528bd8c5d0f6515a57e0c44'/>
<id>urn:sha1:28ee7941280828f9e528bd8c5d0f6515a57e0c44</id>
<content type='text'>
This is less error-prone than "const void *" as the compiler
now detects invalid types being passed.

Signed-off-by: Eric Wong &lt;e@80x24.org&gt;
Reviewed-by: Derrick Stolee &lt;stolee@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
