Skip to content

Commit

Permalink
fixup! cstr: fix type mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
mochaaP committed Oct 16, 2024
1 parent 9695131 commit 108ff23
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/cstr_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ Note that all methods with arguments `(..., const char* str, isize n)`, `n` must

#### Helper methods:
```c
uint64_t cstr_hash(const cstr* self);
size_t cstr_hash(const cstr* self);
int cstr_cmp(const cstr* s1, const cstr* s2);
bool cstr_eq(const cstr* s1, const cstr* s2);
int cstr_icmp(const cstr* s1, const cstr* s2); // utf8 case-insensitive comparison
Expand Down
2 changes: 1 addition & 1 deletion include/stc/priv/cstr_prv.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifndef STC_CSTR_CORE_INCLUDED
#define STC_CSTR_CORE_INCLUDED

uint64_t cstr_hash(const cstr *self) {
size_t cstr_hash(const cstr *self) {
csview sv = cstr_sv(self);
return c_hash_n(sv.buf, sv.size);
}
Expand Down
3 changes: 2 additions & 1 deletion include/stc/priv/cstr_prv.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#include <stdio.h> /* FILE*, vsnprintf */
#include <stdlib.h> /* malloc */
#include <stddef.h> /* size_t */
/**************************** PRIVATE API **********************************/

#if defined __GNUC__ && !defined __clang__
Expand Down Expand Up @@ -76,7 +77,7 @@ extern bool cstr_getdelim(cstr *self, int delim, FILE *fp);
extern void cstr_erase(cstr* self, isize pos, isize len);
extern isize cstr_append_fmt(cstr* self, const char* fmt, ...);
extern isize cstr_printf(cstr* self, const char* fmt, ...);
extern uint64_t cstr_hash(const cstr *self);
extern size_t cstr_hash(const cstr *self);
extern bool cstr_u8_valid(const cstr* self);
extern void cstr_u8_erase(cstr* self, isize u8pos, isize u8len);

Expand Down

0 comments on commit 108ff23

Please sign in to comment.