diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2012-11-20 22:25:07 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2012-11-29 23:38:53 -0800 |
commit | 618fd97d05ba9f1411536c887dbeebe3807c055a (patch) | |
tree | 7395f6837f57d17af06fbd4d3aaf64b5abbe61e6 /lib/gl_xsublist.c | |
parent | e76d7f2cbc2cd785d0c5dc5085ba9e41ab4720b9 (diff) | |
download | gnulib-618fd97d05ba9f1411536c887dbeebe3807c055a.tar.gz |
list, oset, xlist, xoset, xsublist: simplify via extern inline
* lib/gl_list.h, lib/gl_list.c (GL_LIST_INLINE):
* lib/gl_oset.c, lib/gl_oset.h (GL_OSET_INLINE):
* lib/gl_xlist.c, lib/gl_xlist.h (GL_XLIST_INLINE):
* lib/gl_xoset.c, lib/gl_xoset.h (GL_XOSET_INLINE):
* lib/gl_xsublist.c, lib/gl_xsublist.h (GL_XSUBLIST_INLINE):
New macro. Replace all uses of 'static inline' with it.
[HAVE_INLINE]: Implement functions as *_INLINE functions,
instead of as macros FOO that are defined to static inline
functions FOO_inline.
* lib/gl_list.c, lib/gl_oset.c, lib/gl_xlist.c, lib/gl_xoset.c:
* lib/gl_xsublist.c:
Reimplement from scratch, by defining the corresponding *_INLINE
macro and including the corresponding .h file. This is simpler.
* m4/gl_list.m4: Remove.
* modules/list, modules/oset, modules/xlist, modules/xoset:
(Files): Remove m4/gl_list.m4.
(configure.ac): Remove gl_LIST.
* modules/list, modules/oset, modules/xlist, modules/xoset:
* modules/xsublist:
(Depends-on): Depend on extern-inline, not inline.
Diffstat (limited to 'lib/gl_xsublist.c')
-rw-r--r-- | lib/gl_xsublist.c | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/lib/gl_xsublist.c b/lib/gl_xsublist.c index cd1d0ec67f..f5a3eee38d 100644 --- a/lib/gl_xsublist.c +++ b/lib/gl_xsublist.c @@ -1,35 +1,3 @@ -/* Sequential list data type backed by another list, with out-of-memory - checking. - Copyright (C) 2009-2012 Free Software Foundation, Inc. - Written by Bruno Haible <bruno@clisp.org>, 2009. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - #include <config.h> - -/* Specification. */ +#define GL_XSUBLIST_INLINE _GL_EXTERN_INLINE #include "gl_xsublist.h" - -#if !HAVE_INLINE - -gl_list_t -gl_sublist_create (gl_list_t whole_list, size_t start_index, size_t end_index) -{ - gl_list_t result = gl_sublist_nx_create (whole_list, start_index, end_index); - if (result == NULL) - xalloc_die (); - return result; -} - -#endif |