From: Paul Eggert Date: Mon, 30 Aug 2021 00:50:56 +0000 (-0700) Subject: attribute: keep up with gnulib-common.m4 X-Git-Tag: v1.0~2623 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=f077e399f3b635516b8a6fb1ba40515f248a0515;p=gnulib.git attribute: keep up with gnulib-common.m4 * lib/attribute.h (ATTRIBUTE_DEALLOC, ATTRIBUTE_DEALLOC_FREE): New macros, aliases for the _GL_-prefixed macros added to gnulib-common.m4 last month. --- diff --git a/ChangeLog b/ChangeLog index df3f0481f6..b86a6c33a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2021-08-29 Paul Eggert + + attribute: keep up with gnulib-common.m4 + * lib/attribute.h (ATTRIBUTE_DEALLOC, ATTRIBUTE_DEALLOC_FREE): + New macros, aliases for the _GL_-prefixed macros added + to gnulib-common.m4 last month. + 2021-08-29 Bruno Haible supersede: Fix test failure under QEMU user-mode for Linux/mips. diff --git a/lib/attribute.h b/lib/attribute.h index 80a23f550c..26a5556557 100644 --- a/lib/attribute.h +++ b/lib/attribute.h @@ -76,6 +76,14 @@ /* Applies to: function, pointer to function, function types. */ #define ATTRIBUTE_ALLOC_SIZE(args) _GL_ATTRIBUTE_ALLOC_SIZE (args) +/* ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. + ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that + can be freed via 'free'; it can be used only after including . */ +/* Applies to: functions. Cannot be used on inline functions. */ +#define ATTRIBUTE_DEALLOC(f, i) _GL_ATTRIBUTE_DEALLOC(f, i) +#define ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC_FREE /* Attributes for variadic functions. */