diff options
author | Bruno Haible <bruno@clisp.org> | 2021-08-08 00:00:36 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2021-08-08 00:00:36 +0200 |
commit | daabfceeb13e2a927599ba5cf243d0b94e6687c5 (patch) | |
tree | 22e7921df8f65e0678c451719c76f552a815dba5 /lib/gl_xset.h | |
parent | 4c424dc470b6ec000c0a10bb649f07358813f842 (diff) | |
download | gnulib-daabfceeb13e2a927599ba5cf243d0b94e6687c5.tar.gz |
list, set, oset, map, omap: Prepare allocation-deallocation checking.
* lib/gl_list.h (gl_list_create_empty, gl_list_nx_create_empty,
gl_list_create, gl_list_nx_create): Add comment that deallocation must
happen through 'gl_list_free'.
* lib/gl_xlist.h (gl_list_create_empty, gl_list_create): Likewise.
* lib/gl_sublist.h (gl_sublist_create, gl_sublist_nx_create): Likewise.
* lib/gl_xsublist.h (gl_sublist_create): Likewise.
* lib/gl_set.h (gl_set_create_empty, gl_set_nx_create_empty): Add
comment that deallocation must happen through 'gl_set_free'.
* lib/gl_xset.h (gl_set_create_empty): Likewise.
* lib/gl_oset.h (gl_oset_create_empty, gl_oset_nx_create_empty): Add
comment that deallocation must happen through 'gl_oset_free'.
* lib/gl_xoset.h (gl_oset_create_empty): Likewise.
* lib/gl_map.h (gl_map_create_empty, gl_map_nx_create_empty): Add
comment that deallocation must happen through 'gl_map_free'.
* lib/gl_xmap.h (gl_map_create_empty): Likewise.
* lib/gl_omap.h (gl_omap_create_empty, gl_omap_nx_create_empty): Add
comment that deallocation must happen through 'gl_omap_free'.
* lib/gl_xomap.h (gl_omap_create_empty): Likewise.
Diffstat (limited to 'lib/gl_xset.h')
-rw-r--r-- | lib/gl_xset.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/gl_xset.h b/lib/gl_xset.h index 88fa4835f1..5206ba0cee 100644 --- a/lib/gl_xset.h +++ b/lib/gl_xset.h @@ -41,11 +41,16 @@ extern "C" { extern gl_set_t gl_set_create_empty (gl_set_implementation_t implementation, gl_setelement_equals_fn equals_fn, gl_setelement_hashcode_fn hashcode_fn, - gl_setelement_dispose_fn dispose_fn); + gl_setelement_dispose_fn dispose_fn) + /*_GL_ATTRIBUTE_DEALLOC (gl_set_free, 1)*/ + _GL_ATTRIBUTE_RETURNS_NONNULL; extern bool gl_set_add (gl_set_t set, const void *elt); #endif -GL_XSET_INLINE gl_set_t +GL_XSET_INLINE +/*_GL_ATTRIBUTE_DEALLOC (gl_set_free, 1)*/ +_GL_ATTRIBUTE_RETURNS_NONNULL +gl_set_t gl_set_create_empty (gl_set_implementation_t implementation, gl_setelement_equals_fn equals_fn, gl_setelement_hashcode_fn hashcode_fn, |