mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-27 01:26:52 +02:00
only whitespace fixes, mostly removing spaces at ends of lines (and on empty lines)
svn path=/trunk/; revision=6030
This commit is contained in:
parent
a38a770636
commit
8eed88b24e
64
glib/ghash.c
64
glib/ghash.c
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* This library is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
@ -104,7 +104,7 @@ static void g_hash_table_remove_all_nodes (GHashTable *hash_table,
|
|||||||
**/
|
**/
|
||||||
GHashTable*
|
GHashTable*
|
||||||
g_hash_table_new (GHashFunc hash_func,
|
g_hash_table_new (GHashFunc hash_func,
|
||||||
GEqualFunc key_equal_func)
|
GEqualFunc key_equal_func)
|
||||||
{
|
{
|
||||||
return g_hash_table_new_full (hash_func, key_equal_func, NULL, NULL);
|
return g_hash_table_new_full (hash_func, key_equal_func, NULL, NULL);
|
||||||
}
|
}
|
||||||
@ -129,9 +129,9 @@ g_hash_table_new (GHashFunc hash_func,
|
|||||||
**/
|
**/
|
||||||
GHashTable*
|
GHashTable*
|
||||||
g_hash_table_new_full (GHashFunc hash_func,
|
g_hash_table_new_full (GHashFunc hash_func,
|
||||||
GEqualFunc key_equal_func,
|
GEqualFunc key_equal_func,
|
||||||
GDestroyNotify key_destroy_func,
|
GDestroyNotify key_destroy_func,
|
||||||
GDestroyNotify value_destroy_func)
|
GDestroyNotify value_destroy_func)
|
||||||
{
|
{
|
||||||
GHashTable *hash_table;
|
GHashTable *hash_table;
|
||||||
|
|
||||||
@ -217,9 +217,9 @@ g_hash_table_destroy (GHashTable *hash_table)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline GHashNode**
|
static inline GHashNode**
|
||||||
g_hash_table_lookup_node (GHashTable *hash_table,
|
g_hash_table_lookup_node (GHashTable *hash_table,
|
||||||
gconstpointer key,
|
gconstpointer key,
|
||||||
guint *hash_return)
|
guint *hash_return)
|
||||||
{
|
{
|
||||||
GHashNode **node;
|
GHashNode **node;
|
||||||
guint hash_value;
|
guint hash_value;
|
||||||
@ -263,8 +263,8 @@ g_hash_table_lookup_node (GHashTable *hash_table,
|
|||||||
* Return value: the associated value, or %NULL if the key is not found.
|
* Return value: the associated value, or %NULL if the key is not found.
|
||||||
**/
|
**/
|
||||||
gpointer
|
gpointer
|
||||||
g_hash_table_lookup (GHashTable *hash_table,
|
g_hash_table_lookup (GHashTable *hash_table,
|
||||||
gconstpointer key)
|
gconstpointer key)
|
||||||
{
|
{
|
||||||
GHashNode *node;
|
GHashNode *node;
|
||||||
|
|
||||||
@ -291,9 +291,9 @@ g_hash_table_lookup (GHashTable *hash_table,
|
|||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
g_hash_table_lookup_extended (GHashTable *hash_table,
|
g_hash_table_lookup_extended (GHashTable *hash_table,
|
||||||
gconstpointer lookup_key,
|
gconstpointer lookup_key,
|
||||||
gpointer *orig_key,
|
gpointer *orig_key,
|
||||||
gpointer *value)
|
gpointer *value)
|
||||||
{
|
{
|
||||||
GHashNode *node;
|
GHashNode *node;
|
||||||
|
|
||||||
@ -304,9 +304,9 @@ g_hash_table_lookup_extended (GHashTable *hash_table,
|
|||||||
if (node)
|
if (node)
|
||||||
{
|
{
|
||||||
if (orig_key)
|
if (orig_key)
|
||||||
*orig_key = node->key;
|
*orig_key = node->key;
|
||||||
if (value)
|
if (value)
|
||||||
*value = node->value;
|
*value = node->value;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -342,7 +342,7 @@ g_hash_table_insert_internal (GHashTable *hash_table,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (hash_table->value_destroy_func)
|
if (hash_table->value_destroy_func)
|
||||||
hash_table->value_destroy_func ((*node)->value);
|
hash_table->value_destroy_func ((*node)->value);
|
||||||
|
|
||||||
(*node)->value = value;
|
(*node)->value = value;
|
||||||
}
|
}
|
||||||
@ -370,8 +370,8 @@ g_hash_table_insert_internal (GHashTable *hash_table,
|
|||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_hash_table_insert (GHashTable *hash_table,
|
g_hash_table_insert (GHashTable *hash_table,
|
||||||
gpointer key,
|
gpointer key,
|
||||||
gpointer value)
|
gpointer value)
|
||||||
{
|
{
|
||||||
return g_hash_table_insert_internal (hash_table, key, value, FALSE);
|
return g_hash_table_insert_internal (hash_table, key, value, FALSE);
|
||||||
}
|
}
|
||||||
@ -391,8 +391,8 @@ g_hash_table_insert (GHashTable *hash_table,
|
|||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_hash_table_replace (GHashTable *hash_table,
|
g_hash_table_replace (GHashTable *hash_table,
|
||||||
gpointer key,
|
gpointer key,
|
||||||
gpointer value)
|
gpointer value)
|
||||||
{
|
{
|
||||||
return g_hash_table_insert_internal (hash_table, key, value, TRUE);
|
return g_hash_table_insert_internal (hash_table, key, value, TRUE);
|
||||||
}
|
}
|
||||||
@ -468,7 +468,7 @@ g_hash_table_remove_internal (GHashTable *hash_table,
|
|||||||
* Return value: %TRUE if the key was found and removed from the #GHashTable.
|
* Return value: %TRUE if the key was found and removed from the #GHashTable.
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
g_hash_table_remove (GHashTable *hash_table,
|
g_hash_table_remove (GHashTable *hash_table,
|
||||||
gconstpointer key)
|
gconstpointer key)
|
||||||
{
|
{
|
||||||
return g_hash_table_remove_internal (hash_table, key, TRUE);
|
return g_hash_table_remove_internal (hash_table, key, TRUE);
|
||||||
@ -546,9 +546,9 @@ g_hash_table_steal_all (GHashTable *hash_table)
|
|||||||
* Return value: the number of key/value pairs removed.
|
* Return value: the number of key/value pairs removed.
|
||||||
**/
|
**/
|
||||||
guint
|
guint
|
||||||
g_hash_table_foreach_remove (GHashTable *hash_table,
|
g_hash_table_foreach_remove (GHashTable *hash_table,
|
||||||
GHRFunc func,
|
GHRFunc func,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (hash_table != NULL, 0);
|
g_return_val_if_fail (hash_table != NULL, 0);
|
||||||
g_return_val_if_fail (func != NULL, 0);
|
g_return_val_if_fail (func != NULL, 0);
|
||||||
@ -570,8 +570,8 @@ g_hash_table_foreach_remove (GHashTable *hash_table,
|
|||||||
**/
|
**/
|
||||||
guint
|
guint
|
||||||
g_hash_table_foreach_steal (GHashTable *hash_table,
|
g_hash_table_foreach_steal (GHashTable *hash_table,
|
||||||
GHRFunc func,
|
GHRFunc func,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (hash_table != NULL, 0);
|
g_return_val_if_fail (hash_table != NULL, 0);
|
||||||
g_return_val_if_fail (func != NULL, 0);
|
g_return_val_if_fail (func != NULL, 0);
|
||||||
@ -582,7 +582,7 @@ g_hash_table_foreach_steal (GHashTable *hash_table,
|
|||||||
static guint
|
static guint
|
||||||
g_hash_table_foreach_remove_or_steal (GHashTable *hash_table,
|
g_hash_table_foreach_remove_or_steal (GHashTable *hash_table,
|
||||||
GHRFunc func,
|
GHRFunc func,
|
||||||
gpointer user_data,
|
gpointer user_data,
|
||||||
gboolean notify)
|
gboolean notify)
|
||||||
{
|
{
|
||||||
GHashNode *node, **node_ptr;
|
GHashNode *node, **node_ptr;
|
||||||
@ -622,8 +622,8 @@ g_hash_table_foreach_remove_or_steal (GHashTable *hash_table,
|
|||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_hash_table_foreach (GHashTable *hash_table,
|
g_hash_table_foreach (GHashTable *hash_table,
|
||||||
GHFunc func,
|
GHFunc func,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GHashNode *node;
|
GHashNode *node;
|
||||||
gint i;
|
gint i;
|
||||||
@ -663,9 +663,9 @@ g_hash_table_foreach (GHashTable *hash_table,
|
|||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
**/
|
**/
|
||||||
gpointer
|
gpointer
|
||||||
g_hash_table_find (GHashTable *hash_table,
|
g_hash_table_find (GHashTable *hash_table,
|
||||||
GHRFunc predicate,
|
GHRFunc predicate,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GHashNode *node;
|
GHashNode *node;
|
||||||
gint i;
|
gint i;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user