diff options
| author | brian m. carlson <sandals@crustytoothpaste.net> | 2025-10-27 00:43:56 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-10-29 07:35:00 -0700 |
| commit | 3e2a29c146630267b1000c52c94f266647c438a6 (patch) | |
| tree | e92b9ea0303f577afebea06cf7f81c95937eb6d8 /commit.c | |
| parent | rust: add a hash algorithm abstraction (diff) | |
| download | git-3e2a29c146630267b1000c52c94f266647c438a6.tar.gz git-3e2a29c146630267b1000c52c94f266647c438a6.zip | |
hash: add a function to look up hash algo structs
In C, it's easy for us to look up a hash algorithm structure by its
offset by simply indexing the hash_algos array. However, in Rust, we
sometimes need a pointer to pass to a C function, but we have our own
hash algorithm abstraction.
To get one from the other, let's provide a simple function that looks up
the C structure from the offset and expose it in Rust.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions
