aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/clog.c
diff options
context:
space:
mode:
authorJohn Naylor <john.naylor@postgresql.org>2024-01-21 19:19:14 +0700
committerJohn Naylor <john.naylor@postgresql.org>2024-02-06 14:39:36 +0700
commit9ed3ee5001b6a2d4cb0166eb8f12a457f30aaca4 (patch)
tree67ea542a24cea71cad13cc64ca36bd425d7685f7 /src/backend/access/transam/clog.c
parent1f61680327c962d5bafdbf6a04ad9bb0f7232f92 (diff)
downloadpostgresql-9ed3ee5001b6a2d4cb0166eb8f12a457f30aaca4.tar.gz
postgresql-9ed3ee5001b6a2d4cb0166eb8f12a457f30aaca4.zip
Simplify initialization of incremental hash state
The standalone functions fasthash{32,64} use length for two purposes: how many bytes to hash, and how to perturb the internal seed. Developers using the incremental interface may not know the length ahead of time (e.g. for C strings). In this case, it's advised to pass length to the finalizer, but initialization still needed some length up front, in the form of a placeholder macro. Separate the concerns by having the standalone functions perturb the internal seed themselves from their own length parameter, allowing to remove "len" from fasthash_init(), as well as the placeholder macro. Discussion: https://postgr.es/m/CANWCAZbTUk2LOyhsFo33gjLyLAHZ7ucXCi5K9u%3D%2BPtnTShDKtw%40mail.gmail.com
Diffstat (limited to 'src/backend/access/transam/clog.c')
0 files changed, 0 insertions, 0 deletions