bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/4] array-oset, linkedhash-list, rbtree-oset: no need for 'inlin


From: Paul Eggert
Subject: [PATCH 1/4] array-oset, linkedhash-list, rbtree-oset: no need for 'inline'
Date: Sun, 04 Nov 2012 23:17:21 -0800
User-agent: Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121028 Thunderbird/16.0.2

* 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.
---
 ChangeLog                | 11 +++++++++++
 lib/gl_array_oset.c      |  4 ++--
 lib/gl_linkedhash_list.c |  6 +++---
 lib/gl_rbtree_oset.c     |  4 ++--
 4 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d1c76e8..53d9923 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2012-11-04  Paul Eggert  <address@hidden>
+
+       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.
+
 2012-10-30  Paul Eggert  <address@hidden>
 
        list, oset, xlist, xoset, xsublist: simplify via extern inline
diff --git a/lib/gl_array_oset.c b/lib/gl_array_oset.c
index 0ae7fb4..e1c62a3 100644
--- a/lib/gl_array_oset.c
+++ b/lib/gl_array_oset.c
@@ -184,7 +184,7 @@ grow (gl_oset_t set)
 /* 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 @@ gl_array_nx_add_at (gl_oset_t set, size_t position, const 
void *elt)
 
 /* 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;
diff --git a/lib/gl_linkedhash_list.c b/lib/gl_linkedhash_list.c
index 633bb64..fa77b6a 100644
--- 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 @@ hash_resize_after_add (gl_list_t list)
 }
 
 /* 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 @@ add_to_bucket (gl_list_t list, gl_list_node_t node)
 #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;
diff --git a/lib/gl_rbtree_oset.c b/lib/gl_rbtree_oset.c
index a94c14d..2b5a9f3 100644
--- a/lib/gl_rbtree_oset.c
+++ b/lib/gl_rbtree_oset.c
@@ -82,7 +82,7 @@ struct gl_oset_impl
 
    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 @@ rotate_left (gl_oset_node_t b_node, gl_oset_node_t d_node)
 
    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;
-- 
1.7.11.7




reply via email to

[Prev in Thread] Current Thread [Next in Thread]