]> Savannah Git Hosting - gnulib.git/commitdiff
bitsetv: Improve GCC 11 allocation-deallocation checking.
authorBruno Haible <bruno@clisp.org>
Sat, 7 Aug 2021 17:13:56 +0000 (19:13 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 7 Aug 2021 17:13:56 +0000 (19:13 +0200)
* lib/bitsetv.h (bitsetv_free): Move declaration up.
(bitsetv_alloc, bitsetv_create): Declare that deallocation must happen
through 'bitsetv_free'.

ChangeLog
lib/bitsetv.h

index 6e4d3c206295f91e98620437d9b7a5f10b9d7118..7d193dac0ac4b3963c2ef4779c5846a8b0f8c640 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2021-08-07  Bruno Haible  <bruno@clisp.org>
 
+       bitsetv: Improve GCC 11 allocation-deallocation checking.
+       * lib/bitsetv.h (bitsetv_free): Move declaration up.
+       (bitsetv_alloc, bitsetv_create): Declare that deallocation must happen
+       through 'bitsetv_free'.
+
        bitset: Improve GCC 11 allocation-deallocation checking.
        * lib/bitset.h (bitset_free): Move declaration up.
        (bitset_alloc, bitset_create): Declare that deallocation must happen
index 72bf2779f2b2e6978f37ad2a9339087be8ff2671..2ab9b808630e7559afa0c561266197dc101dd972 100644 (file)
 
 typedef bitset * bitsetv;
 
+/* Free vector of bitsets.  Do nothing if NULL.  */
+void bitsetv_free (bitsetv);
+
 /* Create a vector of N_VECS bitsets, each of N_BITS, and of
    type TYPE.  */
-bitsetv bitsetv_alloc (bitset_bindex, bitset_bindex, enum bitset_type);
+bitsetv bitsetv_alloc (bitset_bindex, bitset_bindex, enum bitset_type)
+  _GL_ATTRIBUTE_DEALLOC (bitsetv_free, 1);
 
 /* Create a vector of N_VECS bitsets, each of N_BITS, and with
    attribute hints specified by ATTR.  */
-bitsetv bitsetv_create (bitset_bindex, bitset_bindex, unsigned);
-
-/* Free vector of bitsets.  Do nothing if NULL.  */
-void bitsetv_free (bitsetv);
+bitsetv bitsetv_create (bitset_bindex, bitset_bindex, unsigned)
+  _GL_ATTRIBUTE_DEALLOC (bitsetv_free, 1);
 
 /* Zero vector of bitsets.  */
 void bitsetv_zero (bitsetv);