commit f8c2e76ae39f8ef7f3fdb22bb583cb5cd7ad8a98 from: Stefan Sperling date: Wed Aug 03 11:33:43 2022 UTC revert previous commit to sync with diff.git changes; it broke the build ../lib/blame.c:344:11: error: implicit declaration of function 'diff_atom_hash_update' commit - e233ad8019a1397f1e5705b29099b52d3dcc67e8 commit + f8c2e76ae39f8ef7f3fdb22bb583cb5cd7ad8a98 blob - b7fc3e0f685bcde8614b4795d59fc479c7f4338c blob + dd6b2aa9dd850690d77fb00149d2331f76b827e3 --- lib/diff_atomize_text.c +++ lib/diff_atomize_text.c @@ -29,11 +29,7 @@ #include "diff_internal.h" #include "diff_debug.h" -/* - * 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 +unsigned int diff_atom_hash_update(unsigned int hash, unsigned char atom_byte) { return hash * 23 + atom_byte; blob - 8dba472a6b08ba2fd590485c9c5279ebeb98cf0a blob + 5e816ae10b5948c0aeacd27365a91f3147b96baf --- lib/diff_main.h +++ lib/diff_main.h @@ -39,6 +39,11 @@ 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