summaryrefslogtreecommitdiffstats
path: root/include/zix/btree.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-11-02 15:50:51 -0400
committerDavid Robillard <d@drobilla.net>2022-11-02 15:50:51 -0400
commit30185a4d55786c2d649332fdcbd23e736f74dc80 (patch)
tree280b1c0ca5cf4bb8866d03d31744d616588c4335 /include/zix/btree.h
parent5590b407f8077c1ef0a25cd2948f973000b32683 (diff)
downloadzix-30185a4d55786c2d649332fdcbd23e736f74dc80.tar.gz
zix-30185a4d55786c2d649332fdcbd23e736f74dc80.tar.bz2
zix-30185a4d55786c2d649332fdcbd23e736f74dc80.zip
Relax nullability constraints for BTree values
These pointers are truly opaque, the library does not care about their value at all, and a zero can be stored successfully.
Diffstat (limited to 'include/zix/btree.h')
-rw-r--r--include/zix/btree.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/zix/btree.h b/include/zix/btree.h
index 7199dbc..05b520e 100644
--- a/include/zix/btree.h
+++ b/include/zix/btree.h
@@ -116,7 +116,7 @@ zix_btree_size(const ZixBTree* ZIX_NONNULL t);
/// Insert the element `e` into `t`
ZIX_API
ZixStatus
-zix_btree_insert(ZixBTree* ZIX_NONNULL t, void* ZIX_NULLABLE e);
+zix_btree_insert(ZixBTree* ZIX_NONNULL t, void* ZIX_UNSPECIFIED e);
/**
Remove the value `e` from `t`.
@@ -132,10 +132,10 @@ zix_btree_insert(ZixBTree* ZIX_NONNULL t, void* ZIX_NULLABLE e);
*/
ZIX_API
ZixStatus
-zix_btree_remove(ZixBTree* ZIX_NONNULL t,
- const void* ZIX_NULLABLE e,
- void* ZIX_NULLABLE* ZIX_NONNULL out,
- ZixBTreeIter* ZIX_NONNULL next);
+zix_btree_remove(ZixBTree* ZIX_NONNULL t,
+ const void* ZIX_UNSPECIFIED e,
+ void* ZIX_UNSPECIFIED* ZIX_NONNULL out,
+ ZixBTreeIter* ZIX_NONNULL next);
/**
Set `ti` to an element exactly equal to `e` in `t`.
@@ -145,7 +145,7 @@ zix_btree_remove(ZixBTree* ZIX_NONNULL t,
ZIX_API
ZixStatus
zix_btree_find(const ZixBTree* ZIX_NONNULL t,
- const void* ZIX_NULLABLE e,
+ const void* ZIX_UNSPECIFIED e,
ZixBTreeIter* ZIX_NONNULL ti);
/**
@@ -167,12 +167,12 @@ ZixStatus
zix_btree_lower_bound(const ZixBTree* ZIX_NONNULL t,
ZixCompareFunc ZIX_NULLABLE compare_key,
const void* ZIX_NULLABLE compare_key_user_data,
- const void* ZIX_NULLABLE key,
+ const void* ZIX_UNSPECIFIED key,
ZixBTreeIter* ZIX_NONNULL ti);
/// Return the data at the given position in the tree
ZIX_PURE_API
-void* ZIX_NULLABLE
+void* ZIX_UNSPECIFIED
zix_btree_get(ZixBTreeIter ti);
/// Return an iterator to the first (smallest) element in `t`