summaryrefslogtreecommitdiffstats
path: root/include/zix
diff options
context:
space:
mode:
Diffstat (limited to 'include/zix')
-rw-r--r--include/zix/attributes.h8
-rw-r--r--include/zix/btree.h16
2 files changed, 13 insertions, 11 deletions
diff --git a/include/zix/attributes.h b/include/zix/attributes.h
index b076fa7..dc367a1 100644
--- a/include/zix/attributes.h
+++ b/include/zix/attributes.h
@@ -83,10 +83,12 @@
# define ZIX_NONNULL _Nonnull
# define ZIX_NULLABLE _Nullable
# define ZIX_ALLOCATED _Null_unspecified
+# define ZIX_UNSPECIFIED _Null_unspecified
#else
-# define ZIX_NONNULL ///< A non-null pointer
-# define ZIX_NULLABLE ///< A nullable pointer
-# define ZIX_ALLOCATED ///< An allocated (possibly null) pointer
+# define ZIX_NONNULL ///< A non-null pointer
+# define ZIX_NULLABLE ///< A nullable pointer
+# define ZIX_ALLOCATED ///< An allocated (possibly null) pointer
+# define ZIX_UNSPECIFIED ///< A pointer with unspecified nullability
#endif
/**
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`