/* If the key already exists in the #GHashTable its current value is replaced with the new value. If you supplied a @value_destroy_func when creating the #GHashTable, the old value is freed using that function. If you supplied a @key_destroy_func when creating the #GHashTable, the passed key is freed using that function.  */
void g_hash_table_insert(GHashTable *hash_table, gpointer key, gpointer value)
/* If the key already exists in the #GHashTable its current value is replaced with the new value. If you supplied a @value_destroy_func when creating the #GHashTable, the old value is freed using that function. If you supplied a @key_destroy_func when creating the #GHashTable, the passed key is freed using that function.  */
void g_hash_table_insert(GHashTable *hash_table, gpointer key, gpointer value)
{
  GHashNode **node;
  g_return_if_fail (hash_table != NULL);
  g_return_if_fail (hash_table->ref_count > 0);
  node = g_hash_table_lookup_node (hash_table, key);
  if (*node)
    {
      if (hash_table->key_destroy_func)
	hash_table->key_destroy_func (key);
      if (hash_table->value_destroy_func)
	hash_table->value_destroy_func ((*node)->value);
      (*node)->value = value;
    }
  else
    {
      *node = g_hash_node_new (key, value);
      hash_table->nnodes++;
      G_HASH_TABLE_RESIZE (hash_table);
    }
}