Re: [PATCH v2 4/8] hash.h: introduce `unsafe_hash_algo()`
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Jan 17, 2025, 21:18 UTC
- Message-ID
- <Z4rJMhEkbNfhQ4ua@nand.local>
- In-Reply-To
- <Z4jyZCAwqOjZ-u2U@pks.im>
On Thu, Jan 16, 2025 at 12:49:56PM +0100, Patrick Steinhardt wrote:
Show 11 quoted lines
> > we can instead write: > > > > struct git_hash_algo *algop = the_hash_algo; > > if (unsafe) > > algop = unsafe_hash_algo(algop); > > > > the_hash_algo->init_fn(...); > > the_hash_algo->update_fn(...); > > the_hash_algo->final_fn(...); > > This should all be `algop->init_fn(...)` and so on, right?
Most definitely :-).
Show 5 quoted lines
> For what it's worth, this prompted me to have another look at my > proposal to stop having to use the hash algo altogether for `update()` > et al, and now have a version that works. It builds on top of your patch > series, which still is a step into the right direction. So I'll send it > once your series is being merged down.
Exciting! I'm looking forward to reviewing it.
Thanks, Taylor