summaryrefslogtreecommitdiff
path: root/lib/attribute.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/attribute.h')
-rw-r--r--lib/attribute.h8
1 files changed, 8 insertions, 0 deletions
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 <stdlib.h>. */
+/* 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. */