hashmap: fix documentation misuses of -> versus .

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Elijah Newren 2019-11-05 23:31:31 +00:00 committed by Junio C Hamano
parent a6d39f2efb
commit c92faa4d22

View File

@ -59,7 +59,7 @@
* *
* if (!strcmp("print_all_by_key", action)) { * if (!strcmp("print_all_by_key", action)) {
* struct long2string k, *e; * struct long2string k, *e;
* hashmap_entry_init(&k->ent, memhash(&key, sizeof(long))); * hashmap_entry_init(&k.ent, memhash(&key, sizeof(long)));
* k.key = key; * k.key = key;
* *
* flags &= ~COMPARE_VALUE; * flags &= ~COMPARE_VALUE;
@ -87,12 +87,12 @@
* *
* if (!strcmp("has_exact_match_no_heap_alloc", action)) { * if (!strcmp("has_exact_match_no_heap_alloc", action)) {
* struct long2string k; * struct long2string k;
* hashmap_entry_init(&k->ent, memhash(&key, sizeof(long))); * hashmap_entry_init(&k.ent, memhash(&key, sizeof(long)));
* k.key = key; * k.key = key;
* *
* flags |= COMPARE_VALUE; * flags |= COMPARE_VALUE;
* printf("%sfound\n", * printf("%sfound\n",
* hashmap_get(&map, &k->ent, value) ? "" : "not "); * hashmap_get(&map, &k.ent, value) ? "" : "not ");
* } * }
* *
* if (!strcmp("end", action)) { * if (!strcmp("end", action)) {