aboutsummaryrefslogtreecommitdiffstats
path: root/gl/lib/heap.h
diff options
context:
space:
mode:
Diffstat (limited to 'gl/lib/heap.h')
-rw-r--r--gl/lib/heap.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/gl/lib/heap.h b/gl/lib/heap.h
index 4dd197133..c3be5f47e 100644
--- a/gl/lib/heap.h
+++ b/gl/lib/heap.h
@@ -20,7 +20,13 @@
#include <stddef.h>
-struct heap *heap_alloc (int (*) (void const *, void const *), size_t);
-void heap_free (struct heap *);
-int heap_insert (struct heap *heap, void *item);
-void *heap_remove_top (struct heap *heap);
+struct heap;
+
+void heap_free (struct heap *) _GL_ATTRIBUTE_NONNULL ();
+
+struct heap *heap_alloc (int (*) (void const *, void const *), size_t)
+ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC (heap_free, 1)
+ _GL_ATTRIBUTE_RETURNS_NONNULL;
+
+int heap_insert (struct heap *heap, void *item) _GL_ATTRIBUTE_NONNULL ();
+void *heap_remove_top (struct heap *heap) _GL_ATTRIBUTE_NONNULL ();