]> git.ozlabs.org Git - ccan/commit
htable: separate htable_type constructors to clarify duplicate keys.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 12 Aug 2024 05:34:00 +0000 (15:04 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 29 Nov 2024 04:09:26 +0000 (14:39 +1030)
commitaf04734dfb95fc2dbf78dc72011e71fda7c7c358
treea5bf8b81444878b922c01c74f2ee5f406a18eccd
parent161fe383533c12b95d9117a7ab75b5d3513287b0
htable: separate htable_type constructors to clarify duplicate keys.

Most hash tables do not want duplicates, so specify this
at declaration time.  This way you crash should such a thing
be inserted, not have some subtle behavior you didn't expect!

Also disable the functions depending on the type.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 files changed:
ccan/failtest/failtest.c
ccan/htable/htable_type.h
ccan/htable/test/run-type-int.c
ccan/htable/test/run-type.c
ccan/htable/tools/density.c
ccan/htable/tools/speed.c
ccan/htable/tools/stringspeed.c
ccan/intmap/benchmark/speed.c
ccan/likely/likely.c
ccan/objset/objset.h
tools/ccanlint/tests/reduce_features.c
tools/manifest.c