summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-12-19 18:14:21 -0500
committerDavid Robillard <d@drobilla.net>2022-12-19 18:14:21 -0500
commit56ec14c4369c591f5efbb500b0829b760bee7800 (patch)
tree3dea752a3640a0aef788ac0139e7b91cdc503f94 /include
parent40be117a7c1de7e5002393a565ab30f310986f4a (diff)
downloadzix-56ec14c4369c591f5efbb500b0829b760bee7800.tar.gz
zix-56ec14c4369c591f5efbb500b0829b760bee7800.tar.bz2
zix-56ec14c4369c591f5efbb500b0829b760bee7800.zip
Make allocator methods null-unspecified
The required methods depend on the context (for example, a function might only need aligned_alloc and aligned_free), so unfortunately the nullability requirements can't be encoded in the type here.
Diffstat (limited to 'include')
-rw-r--r--include/zix/allocator.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/zix/allocator.h b/include/zix/allocator.h
index 5ab8bf8..a9064bb 100644
--- a/include/zix/allocator.h
+++ b/include/zix/allocator.h
@@ -96,12 +96,12 @@ typedef void (*ZixAlignedFreeFunc)( //
/// Definition of ZixAllocator
struct ZixAllocatorImpl {
- ZixMallocFunc ZIX_NONNULL malloc; ///< Allocate
- ZixCallocFunc ZIX_NONNULL calloc; ///< Allocate and zero
- ZixReallocFunc ZIX_NONNULL realloc; ///< Reallocate
- ZixFreeFunc ZIX_NONNULL free; ///< Free
- ZixAlignedAllocFunc ZIX_NONNULL aligned_alloc; ///< Allocate aligned
- ZixAlignedFreeFunc ZIX_NONNULL aligned_free; ///< Free aligned
+ ZixMallocFunc ZIX_UNSPECIFIED malloc; ///< Allocate
+ ZixCallocFunc ZIX_UNSPECIFIED calloc; ///< Allocate and zero
+ ZixReallocFunc ZIX_UNSPECIFIED realloc; ///< Reallocate
+ ZixFreeFunc ZIX_UNSPECIFIED free; ///< Free
+ ZixAlignedAllocFunc ZIX_UNSPECIFIED aligned_alloc; ///< Allocate aligned
+ ZixAlignedFreeFunc ZIX_UNSPECIFIED aligned_free; ///< Free aligned
};
/// Return the default allocator which simply uses the system allocator