list, oset, xlist, xoset, xsublist: simplify via extern inline
[gnulib.git] / lib / gl_xoset.h
index f28a830..38da077 100644 (file)
 #include "gl_oset.h"
 #include "xalloc.h"
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef GL_XOSET_INLINE
+# define GL_XOSET_INLINE _GL_INLINE
+#endif
+
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -33,10 +39,7 @@ extern gl_oset_t gl_oset_create_empty (gl_oset_implementation_t implementation,
                                        gl_setelement_dispose_fn dispose_fn);
 extern bool gl_oset_add (gl_oset_t set, const void *elt);
 
-#if HAVE_INLINE
-
-# define gl_oset_create_empty gl_oset_create_empty_inline
-static inline gl_oset_t
+GL_XOSET_INLINE gl_oset_t
 gl_oset_create_empty (gl_oset_implementation_t implementation,
                       gl_setelement_compar_fn compar_fn,
                       gl_setelement_dispose_fn dispose_fn)
@@ -48,8 +51,7 @@ gl_oset_create_empty (gl_oset_implementation_t implementation,
   return result;
 }
 
-# define gl_oset_add gl_oset_add_inline
-static inline bool
+GL_XOSET_INLINE bool
 gl_oset_add (gl_oset_t set, const void *elt)
 {
   int result = gl_oset_nx_add (set, elt);
@@ -58,10 +60,10 @@ gl_oset_add (gl_oset_t set, const void *elt)
   return result;
 }
 
-#endif
-
 #ifdef __cplusplus
 }
 #endif
 
+_GL_INLINE_HEADER_END
+
 #endif /* _GL_XOSET_H */