changeset 17179:bbfb83985261

array-oset, linkedhash-list, rbtree-oset: no need for 'inline' * lib/gl_array_oset.c (gl_array_nx_add_at): (gl_array_remove_at): * lib/gl_linkedhash_list.c (hash_resize_after_add) (add_to_bucket, remove_from_bucket): * lib/gl_rbtree_oset.c (rotate_left, rotate_right): Change 'static inline' to 'static', as it's simpler to omit 'inline' unless there's a significant performance advantage.
author Paul Eggert <eggert@cs.ucla.edu>
date Tue, 20 Nov 2012 22:25:08 -0800
parents 86c983ca0522
children e0def4d44688
files ChangeLog lib/gl_array_oset.c lib/gl_linkedhash_list.c lib/gl_rbtree_oset.c
diffstat 4 files changed, 16 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2012-11-29  Paul Eggert  <eggert@cs.ucla.edu>
 
+	array-oset, linkedhash-list, rbtree-oset: no need for 'inline'
+	* lib/gl_array_oset.c (gl_array_nx_add_at):
+	(gl_array_remove_at):
+	* lib/gl_linkedhash_list.c (hash_resize_after_add)
+	(add_to_bucket, remove_from_bucket):
+	* lib/gl_rbtree_oset.c (rotate_left, rotate_right):
+	Change 'static inline' to 'static', as it's simpler to omit
+	'inline' unless there's a significant performance advantage.
+
 	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):
--- a/lib/gl_array_oset.c
+++ b/lib/gl_array_oset.c
@@ -184,7 +184,7 @@
 /* Add the given element ELT at the given position,
    0 <= position <= gl_oset_size (set).
    Return 1 upon success, -1 upon out-of-memory.  */
-static inline int
+static int
 gl_array_nx_add_at (gl_oset_t set, size_t position, const void *elt)
 {
   size_t count = set->count;
@@ -204,7 +204,7 @@
 
 /* Remove the element at the given position,
    0 <= position < gl_oset_size (set).  */
-static inline void
+static void
 gl_array_remove_at (gl_oset_t set, size_t position)
 {
   size_t count = set->count;
--- a/lib/gl_linkedhash_list.c
+++ b/lib/gl_linkedhash_list.c
@@ -43,7 +43,7 @@
 #include "gl_anyhash_list2.h"
 
 /* Resize the hash table if needed, after list->count was incremented.  */
-static inline void
+static void
 hash_resize_after_add (gl_list_t list)
 {
   size_t count = list->count;
@@ -53,7 +53,7 @@
 }
 
 /* Add a node to the hash table structure.  */
-static inline void
+static void
 add_to_bucket (gl_list_t list, gl_list_node_t node)
 {
   size_t bucket = node->h.hashcode % list->table_size;
@@ -65,7 +65,7 @@
 #define add_to_bucket(list,node)  ((add_to_bucket) (list, node), 0)
 
 /* Remove a node from the hash table structure.  */
-static inline void
+static void
 remove_from_bucket (gl_list_t list, gl_list_node_t node)
 {
   size_t bucket = node->h.hashcode % list->table_size;
--- a/lib/gl_rbtree_oset.c
+++ b/lib/gl_rbtree_oset.c
@@ -82,7 +82,7 @@
 
    Change the tree structure, update the branch sizes.
    The caller must update the colors and register D as child of its parent.  */
-static inline gl_oset_node_t
+static gl_oset_node_t
 rotate_left (gl_oset_node_t b_node, gl_oset_node_t d_node)
 {
   gl_oset_node_t c_node = d_node->left;
@@ -108,7 +108,7 @@
 
    Change the tree structure, update the branch sizes.
    The caller must update the colors and register B as child of its parent.  */
-static inline gl_oset_node_t
+static gl_oset_node_t
 rotate_right (gl_oset_node_t b_node, gl_oset_node_t d_node)
 {
   gl_oset_node_t c_node = b_node->right;