Ok to install? I have a problem with bitset/expandable.[hc], which defines ebitset_*: it corresponds to BITSET_TABLE.
BITSET_TABLE: Expandable table of pointers to arrays of bits (variable size, less storage for large sparse sets). Faster than BITSET_LIST for random access. So, for consistency with the others, I'd to rename either the file, or the enum: would you prefer BITSET_EXPANDABLE, ebitset and bitset/expandable.h, or BITSET_TABLE, tbitset and bitset/table.h? commit 63aa8fe0cb0af9b727d5c64f5d89bcec0f5e5fef Author: Akim Demaille <akim.demai...@gmail.com> Date: Wed Nov 28 07:24:29 2018 +0100 bitset: rename BITSET_VARRAY as BITSET_VECTOR For consistency with the name of the file. * doc/bitset.texi, lib/bitset.c, lib/bitset/base.h, * lib/bitset/stats.c, lib/bitset/vector.c (BITSET_VARRAY): Rename as... (BITSET_VECTOR): this. diff --git a/ChangeLog b/ChangeLog index 681603031..67b3605d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2018-11-28 Akim Demaille <a...@lrde.epita.fr> + + bitset: rename BITSET_VARRAY as BITSET_VECTOR + For consistency with the name of the file. + * doc/bitset.texi, lib/bitset.c, lib/bitset/base.h, + * lib/bitset/stats.c, lib/bitset/vector.c + (BITSET_VARRAY): Rename as... + (BITSET_VECTOR): this. + 2018-11-25 Akim Demaille <a...@lrde.epita.fr> bitsetv: new module diff --git a/doc/bitset.texi b/doc/bitset.texi index 614961b95..d624c0952 100644 --- a/doc/bitset.texi +++ b/doc/bitset.texi @@ -18,7 +18,7 @@ very sparse sets). Expandable table of pointers to arrays of bits (variable size, less storage for large sparse sets). Faster than @code{BITSET_LIST} for random access. -@item BITSET_VARRAY +@item BITSET_VECTOR Variable array of bits (variable size, fast for dense bitsets). @item BITSET_STATS Wrapper bitset for internal use only. Used for gathering statistics diff --git a/lib/bitset.c b/lib/bitset.c index 8b8982091..0d75fe1a0 100644 --- a/lib/bitset.c +++ b/lib/bitset.c @@ -58,7 +58,7 @@ bitset_bytes (enum bitset_type type, bitset_bindex n_bits) case BITSET_TABLE: return ebitset_bytes (n_bits); - case BITSET_VARRAY: + case BITSET_VECTOR: return vbitset_bytes (n_bits); } } @@ -85,7 +85,7 @@ bitset_init (bitset bset, bitset_bindex n_bits, enum bitset_type type) case BITSET_TABLE: return ebitset_init (bset, n_bits); - case BITSET_VARRAY: + case BITSET_VECTOR: return vbitset_init (bset, n_bits); } } @@ -109,7 +109,7 @@ bitset_type_choose (bitset_bindex n_bits ATTRIBUTE_UNUSED, unsigned attr) /* If no attributes selected, choose a good compromise. */ if (!attr) - return BITSET_VARRAY; + return BITSET_VECTOR; if (attr & BITSET_SPARSE) return BITSET_LIST; @@ -120,7 +120,7 @@ bitset_type_choose (bitset_bindex n_bits ATTRIBUTE_UNUSED, unsigned attr) if (attr & BITSET_GREEDY) return BITSET_TABLE; - return BITSET_VARRAY; + return BITSET_VECTOR; } diff --git a/lib/bitset/base.h b/lib/bitset/base.h index b974078be..ed5bb3baa 100644 --- a/lib/bitset/base.h +++ b/lib/bitset/base.h @@ -44,12 +44,12 @@ BITSET_TABLE: Expandable table of pointers to arrays of bits (variable size, less storage for large sparse sets). Faster than BITSET_LIST for random access. - BITSET_VARRAY: Variable array of bits (variable size, fast for + BITSET_VECTOR: Variable array of bits (variable size, fast for dense bitsets). BITSET_STATS: Wrapper bitset for internal use only. Used for gathering statistics and/or better run-time checking. */ -enum bitset_type {BITSET_ARRAY, BITSET_LIST, BITSET_TABLE, BITSET_VARRAY, +enum bitset_type {BITSET_ARRAY, BITSET_LIST, BITSET_TABLE, BITSET_VECTOR, BITSET_TYPE_NUM, BITSET_STATS}; #define BITSET_TYPE_NAMES {"abitset", "lbitset", "ebitset", "vbitset"} diff --git a/lib/bitset/stats.c b/lib/bitset/stats.c index 4947ffbb5..c6e457b1f 100644 --- a/lib/bitset/stats.c +++ b/lib/bitset/stats.c @@ -716,7 +716,7 @@ bitset_stats_init (bitset bset, bitset_bindex n_bits, enum bitset_type type) } break; - case BITSET_VARRAY: + case BITSET_VECTOR: { size_t bytes = vbitset_bytes (n_bits); bset->s.bset = xcalloc (1, bytes); diff --git a/lib/bitset/vector.c b/lib/bitset/vector.c index 75e734505..df54ee085 100644 --- a/lib/bitset/vector.c +++ b/lib/bitset/vector.c @@ -966,7 +966,7 @@ struct bitset_vtable vbitset_vtable = { vbitset_list, vbitset_list_reverse, NULL, - BITSET_VARRAY + BITSET_VECTOR };