I hadn't paid attention to the difference between `hash_t` and `hash_internal`. I guess the reason for not statically allocating a `hash_internal` the usual way here is to keep the code "more abstract", to mention only a single type.

For this particular implementation it would be enough to name `hash_t` what is currently `hash_internal`, and change the interface to take pointers to `hash_t` instead of values, but then that wouldn't work anymore for hashes whose internal state is just an integer, rather than a structure.