summaryrefslogtreecommitdiffstats
path: root/zix/digest.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-11-11 12:22:28 +0100
committerDavid Robillard <d@drobilla.net>2020-11-11 12:26:56 +0100
commit3c18febd87234f54c149bb4a6353e3b0e0103db7 (patch)
tree26c32150fada522778e8df63b747fbe10e7aa3dc /zix/digest.h
parent387f52cd29b6078d441da5fd07a951a481c10b6d (diff)
downloadzix-3c18febd87234f54c149bb4a6353e3b0e0103db7.tar.gz
zix-3c18febd87234f54c149bb4a6353e3b0e0103db7.tar.bz2
zix-3c18febd87234f54c149bb4a6353e3b0e0103db7.zip
Add const, pure, and malloc function attributes
Diffstat (limited to 'zix/digest.h')
-rw-r--r--zix/digest.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/zix/digest.h b/zix/digest.h
index 16ba9b9..c9f3ec0 100644
--- a/zix/digest.h
+++ b/zix/digest.h
@@ -29,7 +29,7 @@ extern "C" {
/**
Return an initial empty digest value.
*/
-ZIX_API uint32_t
+ZIX_CONST_API uint32_t
zix_digest_start(void);
/**
@@ -37,7 +37,7 @@ zix_digest_start(void);
This can be used for any size or alignment.
*/
-ZIX_API uint32_t
+ZIX_PURE_API uint32_t
zix_digest_add(uint32_t hash, const void* buf, size_t len);
/**
@@ -45,7 +45,7 @@ zix_digest_add(uint32_t hash, const void* buf, size_t len);
Both `buf` and `len` must be evenly divisible by 8 (64 bits).
*/
-ZIX_API uint32_t
+ZIX_PURE_API uint32_t
zix_digest_add_64(uint32_t hash, const void* buf, size_t len);
/**
@@ -53,7 +53,7 @@ zix_digest_add_64(uint32_t hash, const void* buf, size_t len);
This hashes the value of the pointer itself, and does not dereference `ptr`.
*/
-ZIX_API uint32_t
+ZIX_CONST_API uint32_t
zix_digest_add_ptr(uint32_t hash, const void* ptr);
#ifdef __cplusplus