diff options
-rw-r--r-- | zix/btree.h | 3 | ||||
-rw-r--r-- | zix/common.h | 23 | ||||
-rw-r--r-- | zix/hash.h | 2 |
3 files changed, 11 insertions, 17 deletions
diff --git a/zix/btree.h b/zix/btree.h index 2de5565..29c01d3 100644 --- a/zix/btree.h +++ b/zix/btree.h @@ -17,13 +17,14 @@ #ifndef ZIX_BTREE_H #define ZIX_BTREE_H -#include <stdbool.h> #include <stddef.h> #include "zix/common.h" #ifdef __cplusplus extern "C" { +#else +# include <stdbool.h> #endif /** diff --git a/zix/common.h b/zix/common.h index 8ec40a1..8c52926 100644 --- a/zix/common.h +++ b/zix/common.h @@ -66,24 +66,17 @@ static inline const char* zix_strerror(const ZixStatus status) { switch (status) { - case ZIX_STATUS_SUCCESS: - return "Success"; - case ZIX_STATUS_ERROR: - return "Unknown error"; - case ZIX_STATUS_NO_MEM: - return "Out of memory"; - case ZIX_STATUS_NOT_FOUND: - return "Not found"; - case ZIX_STATUS_EXISTS: - return "Exists"; - case ZIX_STATUS_BAD_ARG: - return "Bad argument"; - case ZIX_STATUS_BAD_PERMS: - return "Bad permissions"; + case ZIX_STATUS_SUCCESS: return "Success"; + case ZIX_STATUS_ERROR: return "Unknown error"; + case ZIX_STATUS_NO_MEM: return "Out of memory"; + case ZIX_STATUS_NOT_FOUND: return "Not found"; + case ZIX_STATUS_EXISTS: return "Exists"; + case ZIX_STATUS_BAD_ARG: return "Bad argument"; + case ZIX_STATUS_BAD_PERMS: return "Bad permissions"; } return "Unknown error"; } - + /** Function for comparing two elements. */ @@ -81,7 +81,7 @@ zix_hash_size(const ZixHash* hash); If no matching value is found, ZIX_STATUS_SUCCESS will be returned, and @p inserted will be pointed to the copy of `value` made in the new hash node. - + If a matching value already exists, ZIX_STATUS_EXISTS will be returned, and `inserted` will be pointed to the existing value. |