From 088fee1f4b4586e96c3b29314678d05a53eed9c4 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 28 Jun 2022 14:31:05 -0400 Subject: Fix incorrect function attributes The ring accessors are pure, not const, because they read pointed-to data (the ring) that may change between invocations. The BTree iter comparison is const because it only compares the values passed as parameters (although they contain pointers, they aren't dereferenced). --- include/zix/ring.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/zix/ring.h') diff --git a/include/zix/ring.h b/include/zix/ring.h index d7d9713..dc3d4ce 100644 --- a/include/zix/ring.h +++ b/include/zix/ring.h @@ -67,17 +67,17 @@ void zix_ring_reset(ZixRing* ZIX_NONNULL ring); /// Return the number of bytes of space available for reading -ZIX_CONST_API +ZIX_PURE_API uint32_t zix_ring_read_space(const ZixRing* ZIX_NONNULL ring); /// Return the number of bytes of space available for writing -ZIX_CONST_API +ZIX_PURE_API uint32_t zix_ring_write_space(const ZixRing* ZIX_NONNULL ring); /// Return the capacity (i.e. total write space when empty) -ZIX_CONST_API +ZIX_PURE_API uint32_t zix_ring_capacity(const ZixRing* ZIX_NONNULL ring); -- cgit v1.2.1