diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2012-12-05 13:20:25 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2012-12-05 13:20:45 -0800 |
commit | c457e702babb79026dd57036e0652e141f58f72d (patch) | |
tree | a56d43411cac729fe6a4cd3e7b2622409f710dd4 /lib/gl_xlist.h | |
parent | 68d7dd97dc18a17bc23811e5bceb1441e783a215 (diff) | |
download | gnulib-c457e702babb79026dd57036e0652e141f58f72d.tar.gz |
list, oset, xlist, xoset: fix extern inline issue with C99
This was introduced by my recent changes for 'inline'.
Problem reported for gettext by Daiki Ueno in
<http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00000.html>.
* lib/gl_list.h (gl_list_nx_create_empty, gl_list_create)
(gl_list_nx_create, gl_list_size, gl_list_node_value)
(gl_list_node_set_value, gl_list_node_nx_set_value, gl_list_next_node)
(gl_list_previous_node, gl_list_get_at)
(gl_list_nx_set_at, gl_list_search, gl_list_search_from)
(gl_list_search_from_to, gl_list_indexof, gl_list_indexof_from)
(gl_list_indexof_from_to, gl_list_nx_add_first, gl_list_nx_add_last)
(gl_list_nx_add_before, gl_list_nx_add_after, gl_list_nx_add_at)
(gl_list_remove_node, gl_list_remove_at, gl_list_remove, gl_list_free)
(gl_list_iterator, gl_list_iterator_from_to, gl_list_iterator_next)
(gl_list_iterator_free, gl_sortedlist_search)
(gl_sortedlist_search_from_to, gl_sortedlist_indexof)
(gl_sortedlist_indexof_from_to, gl_sortedlist_add, gl_sortedlist_nx_add)
(gl_sortedlist_remove):
* lib/gl_oset.h (go_oset_nx_create_empty, gl_oset_size, gl_oset_search)
(gl_oset_search_atleast, gl_oset_nx_add, gl_oset_remove, gl_oset_free)
(gl_oset_iterator, gl_oset_iterator_next, gl_oset_iterator_free):
* lib/gl_xlist.h (gl_list_create_empty, gl_list_create)
(gl_list_node_set_value, gl_list_set_at, gl_list_add_first)
(gl_list_add_last, gl_list_add_before, gl_list_add_after)
(gl_list_add_at, gl_sortedlist_add):
* lib/gl_xoset.h (gl_oset_create_empty, gl_oset_add):
Wrap these extern decls inside "#if 0", because they are implemented
as inline functions, and extern inline is not what's wanted here.
It would simplify these .h files to remove the extern decls entirely,
although a downside would be less-clear separation between
specification and implementation.
Diffstat (limited to 'lib/gl_xlist.h')
-rw-r--r-- | lib/gl_xlist.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gl_xlist.h b/lib/gl_xlist.h index 32fae110cc..250eb7fb3a 100644 --- a/lib/gl_xlist.h +++ b/lib/gl_xlist.h @@ -33,6 +33,7 @@ extern "C" { /* These functions are thin wrappers around the corresponding functions with _nx_ infix from gl_list.h. Upon out-of-memory, they invoke xalloc_die (), instead of returning an error indicator. */ +#if 0 /* These are defined inline below. */ extern gl_list_t gl_list_create_empty (gl_list_implementation_t implementation, gl_listelement_equals_fn equals_fn, gl_listelement_hashcode_fn hashcode_fn, @@ -59,6 +60,7 @@ extern gl_list_node_t gl_list_add_at (gl_list_t list, size_t position, extern gl_list_node_t gl_sortedlist_add (gl_list_t list, gl_listelement_compar_fn compar, const void *elt); +#endif GL_XLIST_INLINE gl_list_t gl_list_create_empty (gl_list_implementation_t implementation, |