diff -r 862ab606ee06 -r 04c9f8d8f03b ucx/cx/hash_key.h --- a/ucx/cx/hash_key.h Sun Feb 16 17:38:07 2025 +0100 +++ b/ucx/cx/hash_key.h Tue Feb 25 21:12:11 2025 +0100 @@ -26,11 +26,11 @@ * POSSIBILITY OF SUCH DAMAGE. */ /** - * \file hash_key.h - * \brief Interface for map implementations. - * \author Mike Becker - * \author Olaf Wintermann - * \copyright 2-Clause BSD License + * @file hash_key.h + * @brief Interface for map implementations. + * @author Mike Becker + * @author Olaf Wintermann + * @copyright 2-Clause BSD License */ @@ -62,16 +62,21 @@ typedef struct cx_hash_key_s CxHashKey; /** - * Computes a murmur2 32 bit hash. + * Computes a murmur2 32-bit hash. * - * You need to initialize \c data and \c len in the key struct. + * You need to initialize @c data and @c len in the key struct. * The hash is then directly written to that struct. * - * \note If \c data is \c NULL, the hash is defined as 1574210520. + * Usually you should not need this function. + * Use cx_hash_key(), instead. + * + * @note If @c data is @c NULL, the hash is defined as 1574210520. * * @param key the key, the hash shall be computed for + * @see cx_hash_key() */ cx_attr_nonnull +cx_attr_export void cx_hash_murmur(CxHashKey *key); /** @@ -84,6 +89,7 @@ */ cx_attr_nodiscard cx_attr_cstr_arg(1) +cx_attr_export CxHashKey cx_hash_key_str(const char *str); /** @@ -95,6 +101,7 @@ */ cx_attr_nodiscard cx_attr_access_r(1, 2) +cx_attr_export CxHashKey cx_hash_key_bytes( const unsigned char *bytes, size_t len @@ -113,6 +120,7 @@ */ cx_attr_nodiscard cx_attr_access_r(1, 2) +cx_attr_export CxHashKey cx_hash_key( const void *obj, size_t len @@ -132,8 +140,8 @@ /** * Computes a hash key from a UCX string. * - * @param str the string - * @return the hash key + * @param str (@c cxstring or @c cxmutstr) the string + * @return (@c CxHashKey) the hash key */ #define cx_hash_key_cxstr(str) cx_hash_key_cxstr(cx_strcast(str))