summaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2021-09-19 13:49:41 +0200
committerTyge Løvset <[email protected]>2021-09-19 13:49:41 +0200
commit8da81e7a625f06ec667793ff624c6876d03abbde (patch)
treef1c09759a45b42fdff374b9bde009a9356dffe29 /docs
parent58b2831a7287cb00d14a221a9d0263fb0c427675 (diff)
downloadSTC-modified-8da81e7a625f06ec667793ff624c6876d03abbde.tar.gz
STC-modified-8da81e7a625f06ec667793ff624c6876d03abbde.zip
Fixed errors caused by gcc -std=c99 -pedantic.
Diffstat (limited to 'docs')
-rw-r--r--docs/cmap_api.md2
-rw-r--r--docs/cstr_api.md1
2 files changed, 2 insertions, 1 deletions
diff --git a/docs/cmap_api.md b/docs/cmap_api.md
index f72ee280..3fcc8ff8 100644
--- a/docs/cmap_api.md
+++ b/docs/cmap_api.md
@@ -346,7 +346,7 @@ static int RViking_equals(const RViking* r1, const RViking* r2)
{ return !strcmp(r1->name, r2->name) && !strcmp(r1->country, r2->country); }
static uint32_t RViking_hash(const RViking* r, int ignored)
- { return c_rawstr_hash(&r->name) ^ (c_rawstr_hash(&r->country) >> 15); }
+ { return c_strhash(r->name) ^ (c_strhash(r->country) >> 15); }
static Viking Viking_fromR(RViking r)
{ return (Viking){cstr_from(r.name), cstr_from(r.country)}; }
diff --git a/docs/cstr_api.md b/docs/cstr_api.md
index b922092d..ecb58637 100644
--- a/docs/cstr_api.md
+++ b/docs/cstr_api.md
@@ -93,6 +93,7 @@ int c_rawstr_compare(const char** x, const char** y);
bool c_rawstr_equals(const char** x, const char** y);
uint64_t c_rawstr_hash(const char* const* x, ...);
+uint64_t c_strhash(const char* str);
char* c_strnstrn(const char* str, const char* needle, size_t slen, size_t nlen);
int c_strncasecmp(const char* str1, const char* str2, size_t n);
```