]> git.ozlabs.org Git - ccan/commit
htable: restore perfect bit when resizing.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 8 Nov 2010 05:54:31 +0000 (16:24 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 8 Nov 2010 05:54:31 +0000 (16:24 +1030)
commitd3104024f71cf4f89195787add6c7ac381d62f40
treed25210ef408cded9b29e12968b303ab12e748bf4
parent78e983a7a6e5250ebf963d5d93fe34c1d27d5a39
htable: restore perfect bit when resizing.

If the lower bit differs between pointers, we can lose our "perfect"
bit.  Since we're rehashing the entire thing anyway, we can pick
another bit when we double the hash table.
ccan/htable/htable.c
ccan/htable/test/run.c