diff options
| author | Tyge Løvset <[email protected]> | 2021-12-02 17:11:43 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-12-02 17:11:43 +0100 |
| commit | 80b10f6fec8d65b173315fd674b6a14eabf7103e (patch) | |
| tree | d5f78acd29a8d147241d8f59bdc35138b32f3c7e /docs/cmap_api.md | |
| parent | 9cd20ebfc4f1e10153ff814085499223265ef902 (diff) | |
| download | STC-modified-80b10f6fec8d65b173315fd674b6a14eabf7103e.tar.gz STC-modified-80b10f6fec8d65b173315fd674b6a14eabf7103e.zip | |
Update cmap_api.md
Diffstat (limited to 'docs/cmap_api.md')
| -rw-r--r-- | docs/cmap_api.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/cmap_api.md b/docs/cmap_api.md index e4bc266a..51bcdcce 100644 --- a/docs/cmap_api.md +++ b/docs/cmap_api.md @@ -200,7 +200,7 @@ typedef struct { int x, y, z; } Vec3i; #define i_key Vec3i #define i_val int -#define i_cmp c_memcmp_equalto // bitwise compare, and use c_default_hash +#define i_equ c_memcmp_equalto // bitwise compare, and use c_default_hash #define i_tag vi #include <stc/cmap.h> @@ -275,7 +275,7 @@ static bool Viking_equalto(const Viking* a, const Viking* b) { } static uint32_t Viking_hash(const Viking* a, int ignored) { - return cstr_hash(&a->name) ^ (cstr_hash(&a->country) >> 15); + return c_strhash(a->name.str) ^ (c_strhash(a->country.str) >> 15); } static void Viking_del(Viking* v) { |
