bitset_copy from an lbitset did not check whether the destination has
the same type. Apply the same strategy as elsewhere.
Without this commit, the following one fails.
* lib/bitset/list.c (lbitset_copy): Rename as...
(lbitset_copy_): this.
(lbitset_copy): New.
Dispatch to heterogeneous/homogeneous copy.
+2020-11-15 Akim Demaille <akim@lrde.epita.fr>
+
+ bitset: fix the copy from lbitset to other types
+ * lib/bitset/list.c (lbitset_copy): Rename as...
+ (lbitset_copy_): this.
+ (lbitset_copy): New.
+ Dispatch to heterogeneous/homogeneous copy.
+
2020-11-15 Akim Demaille <akim@lrde.epita.fr>
bitset: making debug traces more useful
/* Copy bits from bitset SRC to bitset DST. */
static inline void
-lbitset_copy (bitset dst, bitset src)
+lbitset_copy_ (bitset dst, bitset src)
{
if (src == dst)
return;
}
+static void
+lbitset_copy (bitset dst, bitset src)
+{
+ if (BITSET_COMPATIBLE_ (dst, src))
+ lbitset_copy_ (dst, src);
+ else
+ bitset_copy_ (dst, src);
+}
+
/* Copy bits from bitset SRC to bitset DST. Return true if
bitsets different. */
static inline bool