commit f400825bc668466d9fc593470514d6e69ddfc5ff from: Omar Polo date: Wed Aug 03 07:08:26 2022 UTC make diff_atom_hash_update private to diff_atomize_text.c ok stsp@ commit - cd9ef01a441e0ecfd499bf907c15a2878f7e0ee2 commit + f400825bc668466d9fc593470514d6e69ddfc5ff blob - 5e816ae10b5948c0aeacd27365a91f3147b96baf blob + 8dba472a6b08ba2fd590485c9c5279ebeb98cf0a --- include/diff_main.h +++ include/diff_main.h @@ -39,11 +39,6 @@ struct diff_atom { unsigned int hash; }; -/* Mix another atom_byte into the provided hash value and return the result. - * The hash value passed in for the first byte of the atom must be zero. */ -unsigned int -diff_atom_hash_update(unsigned int hash, unsigned char atom_byte); - /* Compare two atoms for equality. Return 0 on success, or errno on failure. * Set cmp to -1, 0, or 1, just like strcmp(). */ int blob - dd6b2aa9dd850690d77fb00149d2331f76b827e3 blob + b7fc3e0f685bcde8614b4795d59fc479c7f4338c --- lib/diff_atomize_text.c +++ lib/diff_atomize_text.c @@ -29,7 +29,11 @@ #include "diff_internal.h" #include "diff_debug.h" -unsigned int +/* + * Mix another atom_byte into the provided hash value and return the result. + * The hash value passed in for the first byte of the atom must be zero. + */ +static unsigned int diff_atom_hash_update(unsigned int hash, unsigned char atom_byte) { return hash * 23 + atom_byte;