- Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
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
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
/* Creation and destruction. */
static inline void hmapx_init (struct hmapx *);
static inline void hmapx_swap (struct hmapx *, struct hmapx *);
/* Creation and destruction. */
static inline void hmapx_init (struct hmapx *);
static inline void hmapx_swap (struct hmapx *, struct hmapx *);
These macros automatically use hmapx_node_data() to obtain the
data elements that encapsulate hmap nodes, which often saves
typing and can make code easier to read. Refer to the large
These macros automatically use hmapx_node_data() to obtain the
data elements that encapsulate hmap nodes, which often saves
typing and can make code easier to read. Refer to the large
These macros evaluate their arguments many times. */
#define HMAPX_FOR_EACH(DATA, NODE, HMAPX) \
These macros evaluate their arguments many times. */
#define HMAPX_FOR_EACH(DATA, NODE, HMAPX) \
store its current number of elements, allocating a new set of
buckets and rehashing if that would save space. */
static inline void
store its current number of elements, allocating a new set of
buckets and rehashing if that would save space. */
static inline void
{
return HMAP_FIRST_WITH_HASH (struct hmapx_node, hmap_node, &map->hmap, hash);
}
{
return HMAP_FIRST_WITH_HASH (struct hmapx_node, hmap_node, &map->hmap, hash);
}
{
return HMAP_NEXT (node, struct hmapx_node, hmap_node, &map->hmap);
}
{
return HMAP_NEXT (node, struct hmapx_node, hmap_node, &map->hmap);
}
capacity. However, inserting many more elements than the
map's capacity will degrade search performance. */
static inline size_t
capacity. However, inserting many more elements than the
map's capacity will degrade search performance. */
static inline size_t
case), then the client must check for duplicates before
changing NODE's value. */
static inline void
case), then the client must check for duplicates before
changing NODE's value. */
static inline void