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):
/* 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;
/* 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;
#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;
}
/* 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;
#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;
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;
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;