Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Mashpoe committed Jul 6, 2021
1 parent db6d9c1 commit b541b11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Unfortunatley, `strlen()` is an O(n) function, which is not ideal when you're tr

### Key Lifetime

Keys will not be copied by when adding an entry to the hashmap. It's unsafe to free the contents of a key that was passed to `hashmap_set()` before you're done using a hashmap. If you need to copy a key so it will last for the entire lifetime of the hashmap, you must do that yourself (e.g. using [`strcpy()`](https://en.cppreference.com/w/c/string/byte/strcpy) or [`memcpy()`](https://en.cppreference.com/w/c/string/byte/memcpy)). If you need to free any keys that you copied over to the hashmap, read the "[Cleaning Up](#cleaning-up)" section below.
Keys will not be copied when adding an entry to the hashmap. It's unsafe to free the contents of a key that was passed to `hashmap_set()` before you're done using a hashmap. If you need to copy a key so it will last for the entire lifetime of the hashmap, you must do that yourself (e.g. using [`strcpy()`](https://en.cppreference.com/w/c/string/byte/strcpy) or [`memcpy()`](https://en.cppreference.com/w/c/string/byte/memcpy)). If you need to free any keys that you copied over to the hashmap, read the "[Cleaning Up](#cleaning-up)" section below.

## Getting Values From Keys

Expand Down

0 comments on commit b541b11

Please sign in to comment.