summaryrefslogtreecommitdiffstats
path: root/src/zix/digest.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-11-11 13:28:26 +0100
committerDavid Robillard <d@drobilla.net>2020-11-11 13:28:26 +0100
commitf02ff178ad0fc9c180a718cfa6786e2e5465f28a (patch)
tree7bcd14c417bb5d1d43503ec0dd2137749c81972e /src/zix/digest.c
parent3faa8cc20b2c0fd3ba414e5af2bbddc96cd30f7c (diff)
downloadsord-f02ff178ad0fc9c180a718cfa6786e2e5465f28a.tar.gz
sord-f02ff178ad0fc9c180a718cfa6786e2e5465f28a.tar.bz2
sord-f02ff178ad0fc9c180a718cfa6786e2e5465f28a.zip
Update zix
Diffstat (limited to 'src/zix/digest.c')
-rw-r--r--src/zix/digest.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/zix/digest.c b/src/zix/digest.c
index 889cfde..2ac1715 100644
--- a/src/zix/digest.c
+++ b/src/zix/digest.c
@@ -27,13 +27,13 @@
// SSE 4.2 CRC32
-ZIX_API uint32_t
+uint32_t
zix_digest_start(void)
{
return 1;
}
-ZIX_API uint32_t
+uint32_t
zix_digest_add(uint32_t hash, const void* const buf, const size_t len)
{
const uint8_t* str = (const uint8_t*)buf;
@@ -57,7 +57,7 @@ zix_digest_add(uint32_t hash, const void* const buf, const size_t len)
return hash;
}
-ZIX_API uint32_t
+uint32_t
zix_digest_add_64(uint32_t hash, const void* const buf, const size_t len)
{
assert((uintptr_t)buf % sizeof(uint64_t) == 0);
@@ -73,7 +73,7 @@ zix_digest_add_64(uint32_t hash, const void* const buf, const size_t len)
return hash;
}
-ZIX_API uint32_t
+uint32_t
zix_digest_add_ptr(const uint32_t hash, const void* const ptr)
{
#if UINTPTR_MAX == UINT64_MAX
@@ -87,13 +87,13 @@ zix_digest_add_ptr(const uint32_t hash, const void* const ptr)
// Classic DJB hash
-ZIX_API uint32_t
+uint32_t
zix_digest_start(void)
{
return 5381;
}
-ZIX_API uint32_t
+uint32_t
zix_digest_add(uint32_t hash, const void* const buf, const size_t len)
{
const uint8_t* str = (const uint8_t*)buf;
@@ -105,7 +105,7 @@ zix_digest_add(uint32_t hash, const void* const buf, const size_t len)
return hash;
}
-ZIX_API uint32_t
+uint32_t
zix_digest_add_64(uint32_t hash, const void* const buf, const size_t len)
{
assert((uintptr_t)buf % sizeof(uint64_t) == 0);
@@ -114,7 +114,7 @@ zix_digest_add_64(uint32_t hash, const void* const buf, const size_t len)
return zix_digest_add(hash, buf, len);
}
-ZIX_API uint32_t
+uint32_t
zix_digest_add_ptr(const uint32_t hash, const void* const ptr)
{
return zix_digest_add(hash, &ptr, sizeof(ptr));