commit 15be8247b968c9b2207351c3d4227835a45acc3c from: Stefan Sperling via: Thomas Adam date: Sat Aug 06 20:57:41 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 - 625f17044230c2d7649bacd57675d18658f42ba5 commit + 15be8247b968c9b2207351c3d4227835a45acc3c 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