<div dir="ltr">I felt the inconsistentsy was kinda awfull.<div><br></div><div style>I can change all to void* (instead of, void *) if you like but else leave this patch to the trash?</div></div><div class="gmail_extra"><br>
<br><div class="gmail_quote">2013/4/26 Kay Sievers <span dir="ltr"><<a href="mailto:kay@vrfy.org" target="_blank">kay@vrfy.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Fri, Apr 26, 2013 at 7:49 PM, Zbigniew Jędrzejewski-Szmek<br>
<<a href="mailto:zbyszek@in.waw.pl">zbyszek@in.waw.pl</a>> wrote:<br>
> On Fri, Apr 26, 2013 at 06:40:08PM +0200, Daniel Buch wrote:<br>
>> ---<br>
>> src/shared/hashmap.h | 14 +++++++-------<br>
>> 1 file changed, 7 insertions(+), 7 deletions(-)<br>
>><br>
>> diff --git a/src/shared/hashmap.h b/src/shared/hashmap.h<br>
>> index 26bd030..f52517f 100644<br>
>> --- a/src/shared/hashmap.h<br>
>> +++ b/src/shared/hashmap.h<br>
>> @@ -57,11 +57,11 @@ int hashmap_ensure_allocated(Hashmap **h, hash_func_t hash_func, compare_func_t<br>
>> int hashmap_put(Hashmap *h, const void *key, void *value);<br>
>> int hashmap_update(Hashmap *h, const void *key, void *value);<br>
>> int hashmap_replace(Hashmap *h, const void *key, void *value);<br>
>> -void* hashmap_get(Hashmap *h, const void *key);<br>
>> -void* hashmap_get2(Hashmap *h, const void *key, void **rkey);<br>
>> +void *hashmap_get(Hashmap *h, const void *key);<br>
>> +void *hashmap_get2(Hashmap *h, const void *key, void **rkey);<br>
>> bool hashmap_contains(Hashmap *h, const void *key);<br>
>> -void* hashmap_remove(Hashmap *h, const void *key);<br>
>> -void* hashmap_remove_value(Hashmap *h, const void *key, void *value);<br>
>> +void *hashmap_remove(Hashmap *h, const void *key);<br>
>> +void *hashmap_remove_value(Hashmap *h, const void *key, void *value);<br>
>> int hashmap_remove_and_put(Hashmap *h, const void *old_key, const void *new_key, void *value);<br>
><br>
> I find the updated version actually harder to read. We seem to consistently<br>
> use 'char* xxx()', and 'void* xxx' is more common than 'void *xxx'.<br>
<br>
</div></div>What's the point of the inconsistent:<br>
<div class="im"> void* hashmap_get(Hashmap *h, const void *key)<br>
<br>
</div>it needs to be:<br>
void* hashmap_get(Hashmap* h, const void* key)<br>
<br>
then, if we really go there. :)<br>
<span class="HOEnZb"><font color="#888888"><br>
Kay<br>
</font></span></blockquote></div><br></div>