aboutsummaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/string.c b/string.c
index 0fc8341..3d5841a 100644
--- a/string.c
+++ b/string.c
@@ -13,17 +13,17 @@ int Str_equals(Str a, Str b) {
uint64_t Str_hash64(Str s) {
uint64_t h = 0x100;
- for (ptrdiff_t i = 0; i < s.len; i++) {
+ for (size i = 0; i < s.len; i++) {
h ^= s.data[i] & 255;
h *= 1111111111111111111;
}
return h;
}
-Str* Str_copy(Arena *a, char *data, uintptr_t len) {
+Str* Str_copy(Arena *a, byte *data, size len) {
Str *str = new(a, Str, 1);
str->len = len;
- str->data = new (a, char, len);
+ str->data = new (a, byte, len);
if (str->len)
memcpy(str->data, data, len);
return str;