~ubuntu-branches/debian/jessie/glib2.0/jessie

« back to all changes in this revision

Viewing changes to docs/reference/glib/html/glib-Hash-Tables.html

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2009-02-15 13:00:43 UTC
  • mto: (1.4.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 70.
  • Revision ID: james.westby@ubuntu.com-20090215130043-6snh45flhit8oalb
Tags: upstream-2.18.4
Import upstream version 2.18.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
2
<html>
3
3
<head>
4
 
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>Hash Tables</title>
6
 
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
7
 
<link rel="start" href="index.html" title="GLib Reference Manual">
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 
7
<link rel="home" href="index.html" title="GLib Reference Manual">
8
8
<link rel="up" href="glib-data-types.html" title="GLib Data Types">
9
9
<link rel="prev" href="glib-Trash-Stacks.html" title="Trash Stacks">
10
10
<link rel="next" href="glib-Strings.html" title="Strings">
11
 
<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
 
11
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
<link rel="chapter" href="glib.html" title="GLib Overview">
14
14
<link rel="chapter" href="glib-fundamentals.html" title="GLib Fundamentals">
26
26
<link rel="index" href="ix08.html" title="Index of new symbols in 2.12">
27
27
<link rel="index" href="ix09.html" title="Index of new symbols in 2.14">
28
28
<link rel="index" href="ix10.html" title="Index of new symbols in 2.16">
 
29
<link rel="index" href="ix11.html" title="Index of new symbols in 2.18">
29
30
</head>
30
31
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
31
32
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
36
37
<th width="100%" align="center">GLib Reference Manual</th>
37
38
<td><a accesskey="n" href="glib-Strings.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
38
39
</tr>
39
 
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id3344133" class="shortcut">Top</a>
40
 
                  &#160;|&#160;
41
 
                  <a href="#id3345239" class="shortcut">Description</a></nobr></td></tr>
 
40
<tr><td colspan="5" class="shortcuts">
 
41
<a href="#glib-Hash-Tables.synopsis" class="shortcut">Top</a>
 
42
                 | 
 
43
                <a href="#glib-Hash-Tables.description" class="shortcut">Description</a>
 
44
</td></tr>
42
45
</table>
43
46
<div class="refentry" lang="en">
44
47
<a name="glib-Hash-Tables"></a><div class="titlepage"></div>
45
48
<div class="refnamediv"><table width="100%"><tr>
46
49
<td valign="top">
47
 
<h2>
48
 
<a name="id3344133"></a><span class="refentrytitle">Hash Tables</span>
49
 
</h2>
50
 
<p>Hash Tables &#8212; associations between keys and values so that given a key the value
 
50
<h2><span class="refentrytitle"><a name="glib-Hash-Tables.top_of_page"></a>Hash Tables</span></h2>
 
51
<p>Hash Tables — associations between keys and values so that given a key the value
51
52
can be found quickly</p>
52
53
</td>
53
54
<td valign="top" align="right"></td>
54
55
</tr></table></div>
55
56
<div class="refsynopsisdiv">
56
 
<h2>Synopsis</h2>
 
57
<a name="glib-Hash-Tables.synopsis"></a><h2>Synopsis</h2>
57
58
<pre class="synopsis">
58
59
 
59
60
#include &lt;glib.h&gt;
60
61
 
61
 
 
62
 
                    <a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a>;
63
 
<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a>*         <a class="link" href="glib-Hash-Tables.html#g-hash-table-new">g_hash_table_new</a>                    (<a class="link" href="glib-Hash-Tables.html#GHashFunc">GHashFunc</a> hash_func,
64
 
                                                         <a class="link" href="glib-Hash-Tables.html#GEqualFunc">GEqualFunc</a> key_equal_func);
65
 
<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a>*         <a class="link" href="glib-Hash-Tables.html#g-hash-table-new-full">g_hash_table_new_full</a>               (<a class="link" href="glib-Hash-Tables.html#GHashFunc">GHashFunc</a> hash_func,
66
 
                                                         <a class="link" href="glib-Hash-Tables.html#GEqualFunc">GEqualFunc</a> key_equal_func,
67
 
                                                         <a class="link" href="glib-Datasets.html#GDestroyNotify">GDestroyNotify</a> key_destroy_func,
68
 
                                                         <a class="link" href="glib-Datasets.html#GDestroyNotify">GDestroyNotify</a> value_destroy_func);
69
 
<a class="link" href="glib-Basic-Types.html#guint">guint</a>               (<a class="link" href="glib-Hash-Tables.html#GHashFunc">*GHashFunc</a>)                        (<a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> key);
70
 
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            (<a class="link" href="glib-Hash-Tables.html#GEqualFunc">*GEqualFunc</a>)                       (<a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> a,
71
 
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> b);
72
 
void                <a class="link" href="glib-Hash-Tables.html#g-hash-table-insert">g_hash_table_insert</a>                 (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
73
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> key,
74
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> value);
75
 
void                <a class="link" href="glib-Hash-Tables.html#g-hash-table-replace">g_hash_table_replace</a>                (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
76
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> key,
77
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> value);
78
 
<a class="link" href="glib-Basic-Types.html#guint">guint</a>               <a class="link" href="glib-Hash-Tables.html#g-hash-table-size">g_hash_table_size</a>                   (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);
79
 
<a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a>            <a class="link" href="glib-Hash-Tables.html#g-hash-table-lookup">g_hash_table_lookup</a>                 (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
80
 
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> key);
81
 
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            <a class="link" href="glib-Hash-Tables.html#g-hash-table-lookup-extended">g_hash_table_lookup_extended</a>        (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
82
 
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> lookup_key,
83
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> *orig_key,
84
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> *value);
85
 
void                <a class="link" href="glib-Hash-Tables.html#g-hash-table-foreach">g_hash_table_foreach</a>                (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
86
 
                                                         <a class="link" href="glib-Hash-Tables.html#GHFunc">GHFunc</a> func,
87
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);
88
 
<a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a>            <a class="link" href="glib-Hash-Tables.html#g-hash-table-find">g_hash_table_find</a>                   (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
89
 
                                                         <a class="link" href="glib-Hash-Tables.html#GHRFunc">GHRFunc</a> predicate,
90
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);
91
 
void                (<a class="link" href="glib-Hash-Tables.html#GHFunc">*GHFunc</a>)                           (<a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> key,
92
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> value,
93
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);
94
 
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            <a class="link" href="glib-Hash-Tables.html#g-hash-table-remove">g_hash_table_remove</a>                 (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
95
 
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> key);
96
 
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            <a class="link" href="glib-Hash-Tables.html#g-hash-table-steal">g_hash_table_steal</a>                  (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
97
 
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> key);
98
 
<a class="link" href="glib-Basic-Types.html#guint">guint</a>               <a class="link" href="glib-Hash-Tables.html#g-hash-table-foreach-remove">g_hash_table_foreach_remove</a>         (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
99
 
                                                         <a class="link" href="glib-Hash-Tables.html#GHRFunc">GHRFunc</a> func,
100
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);
101
 
<a class="link" href="glib-Basic-Types.html#guint">guint</a>               <a class="link" href="glib-Hash-Tables.html#g-hash-table-foreach-steal">g_hash_table_foreach_steal</a>          (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
102
 
                                                         <a class="link" href="glib-Hash-Tables.html#GHRFunc">GHRFunc</a> func,
103
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);
104
 
void                <a class="link" href="glib-Hash-Tables.html#g-hash-table-remove-all">g_hash_table_remove_all</a>             (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);
105
 
void                <a class="link" href="glib-Hash-Tables.html#g-hash-table-steal-all">g_hash_table_steal_all</a>              (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);
106
 
<a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a>*              <a class="link" href="glib-Hash-Tables.html#g-hash-table-get-keys">g_hash_table_get_keys</a>               (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);
107
 
<a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a>*              <a class="link" href="glib-Hash-Tables.html#g-hash-table-get-values">g_hash_table_get_values</a>             (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);
108
 
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            (<a class="link" href="glib-Hash-Tables.html#GHRFunc">*GHRFunc</a>)                          (<a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> key,
109
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> value,
110
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);
111
 
#define             <a class="link" href="glib-Hash-Tables.html#g-hash-table-freeze">g_hash_table_freeze</a>                 (hash_table)
112
 
#define             <a class="link" href="glib-Hash-Tables.html#g-hash-table-thaw">g_hash_table_thaw</a>                   (hash_table)
113
 
void                <a class="link" href="glib-Hash-Tables.html#g-hash-table-destroy">g_hash_table_destroy</a>                (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);
114
 
<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a>*         <a class="link" href="glib-Hash-Tables.html#g-hash-table-ref">g_hash_table_ref</a>                    (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);
115
 
void                <a class="link" href="glib-Hash-Tables.html#g-hash-table-unref">g_hash_table_unref</a>                  (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);
116
 
                    <a class="link" href="glib-Hash-Tables.html#GHashTableIter">GHashTableIter</a>;
117
 
void                <a class="link" href="glib-Hash-Tables.html#g-hash-table-iter-init">g_hash_table_iter_init</a>              (<a class="link" href="glib-Hash-Tables.html#GHashTableIter">GHashTableIter</a> *iter,
118
 
                                                         <a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);
119
 
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            <a class="link" href="glib-Hash-Tables.html#g-hash-table-iter-next">g_hash_table_iter_next</a>              (<a class="link" href="glib-Hash-Tables.html#GHashTableIter">GHashTableIter</a> *iter,
120
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> *key,
121
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> *value);
122
 
<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a>*         <a class="link" href="glib-Hash-Tables.html#g-hash-table-iter-get-hash-table">g_hash_table_iter_get_hash_table</a>    (<a class="link" href="glib-Hash-Tables.html#GHashTableIter">GHashTableIter</a> *iter);
123
 
void                <a class="link" href="glib-Hash-Tables.html#g-hash-table-iter-remove">g_hash_table_iter_remove</a>            (<a class="link" href="glib-Hash-Tables.html#GHashTableIter">GHashTableIter</a> *iter);
124
 
void                <a class="link" href="glib-Hash-Tables.html#g-hash-table-iter-steal">g_hash_table_iter_steal</a>             (<a class="link" href="glib-Hash-Tables.html#GHashTableIter">GHashTableIter</a> *iter);
125
 
 
126
 
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            <a class="link" href="glib-Hash-Tables.html#g-direct-equal">g_direct_equal</a>                      (<a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v1,
127
 
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v2);
128
 
<a class="link" href="glib-Basic-Types.html#guint">guint</a>               <a class="link" href="glib-Hash-Tables.html#g-direct-hash">g_direct_hash</a>                       (<a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v);
129
 
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            <a class="link" href="glib-Hash-Tables.html#g-int-equal">g_int_equal</a>                         (<a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v1,
130
 
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v2);
131
 
<a class="link" href="glib-Basic-Types.html#guint">guint</a>               <a class="link" href="glib-Hash-Tables.html#g-int-hash">g_int_hash</a>                          (<a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v);
132
 
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            <a class="link" href="glib-Hash-Tables.html#g-str-equal">g_str_equal</a>                         (<a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v1,
133
 
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v2);
134
 
<a class="link" href="glib-Basic-Types.html#guint">guint</a>               <a class="link" href="glib-Hash-Tables.html#g-str-hash">g_str_hash</a>                          (<a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v);
 
62
                    <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a>;
 
63
<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a>*         <a class="link" href="glib-Hash-Tables.html#g-hash-table-new" title="g_hash_table_new ()">g_hash_table_new</a>                    (<a class="link" href="glib-Hash-Tables.html#GHashFunc" title="GHashFunc ()">GHashFunc</a> hash_func,
 
64
                                                         <a class="link" href="glib-Hash-Tables.html#GEqualFunc" title="GEqualFunc ()">GEqualFunc</a> key_equal_func);
 
65
<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a>*         <a class="link" href="glib-Hash-Tables.html#g-hash-table-new-full" title="g_hash_table_new_full ()">g_hash_table_new_full</a>               (<a class="link" href="glib-Hash-Tables.html#GHashFunc" title="GHashFunc ()">GHashFunc</a> hash_func,
 
66
                                                         <a class="link" href="glib-Hash-Tables.html#GEqualFunc" title="GEqualFunc ()">GEqualFunc</a> key_equal_func,
 
67
                                                         <a class="link" href="glib-Datasets.html#GDestroyNotify" title="GDestroyNotify ()">GDestroyNotify</a> key_destroy_func,
 
68
                                                         <a class="link" href="glib-Datasets.html#GDestroyNotify" title="GDestroyNotify ()">GDestroyNotify</a> value_destroy_func);
 
69
<a class="link" href="glib-Basic-Types.html#guint" title="guint">guint</a>               (<a class="link" href="glib-Hash-Tables.html#GHashFunc" title="GHashFunc ()">*GHashFunc</a>)                        (<a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> key);
 
70
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            (<a class="link" href="glib-Hash-Tables.html#GEqualFunc" title="GEqualFunc ()">*GEqualFunc</a>)                       (<a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> a,
 
71
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> b);
 
72
void                <a class="link" href="glib-Hash-Tables.html#g-hash-table-insert" title="g_hash_table_insert ()">g_hash_table_insert</a>                 (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table,
 
73
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> key,
 
74
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> value);
 
75
void                <a class="link" href="glib-Hash-Tables.html#g-hash-table-replace" title="g_hash_table_replace ()">g_hash_table_replace</a>                (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table,
 
76
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> key,
 
77
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> value);
 
78
<a class="link" href="glib-Basic-Types.html#guint" title="guint">guint</a>               <a class="link" href="glib-Hash-Tables.html#g-hash-table-size" title="g_hash_table_size ()">g_hash_table_size</a>                   (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table);
 
79
<a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a>            <a class="link" href="glib-Hash-Tables.html#g-hash-table-lookup" title="g_hash_table_lookup ()">g_hash_table_lookup</a>                 (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table,
 
80
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> key);
 
81
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            <a class="link" href="glib-Hash-Tables.html#g-hash-table-lookup-extended" title="g_hash_table_lookup_extended ()">g_hash_table_lookup_extended</a>        (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table,
 
82
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> lookup_key,
 
83
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> *orig_key,
 
84
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> *value);
 
85
void                <a class="link" href="glib-Hash-Tables.html#g-hash-table-foreach" title="g_hash_table_foreach ()">g_hash_table_foreach</a>                (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table,
 
86
                                                         <a class="link" href="glib-Hash-Tables.html#GHFunc" title="GHFunc ()">GHFunc</a> func,
 
87
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> user_data);
 
88
<a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a>            <a class="link" href="glib-Hash-Tables.html#g-hash-table-find" title="g_hash_table_find ()">g_hash_table_find</a>                   (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table,
 
89
                                                         <a class="link" href="glib-Hash-Tables.html#GHRFunc" title="GHRFunc ()">GHRFunc</a> predicate,
 
90
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> user_data);
 
91
void                (<a class="link" href="glib-Hash-Tables.html#GHFunc" title="GHFunc ()">*GHFunc</a>)                           (<a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> key,
 
92
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> value,
 
93
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> user_data);
 
94
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            <a class="link" href="glib-Hash-Tables.html#g-hash-table-remove" title="g_hash_table_remove ()">g_hash_table_remove</a>                 (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table,
 
95
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> key);
 
96
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            <a class="link" href="glib-Hash-Tables.html#g-hash-table-steal" title="g_hash_table_steal ()">g_hash_table_steal</a>                  (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table,
 
97
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> key);
 
98
<a class="link" href="glib-Basic-Types.html#guint" title="guint">guint</a>               <a class="link" href="glib-Hash-Tables.html#g-hash-table-foreach-remove" title="g_hash_table_foreach_remove ()">g_hash_table_foreach_remove</a>         (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table,
 
99
                                                         <a class="link" href="glib-Hash-Tables.html#GHRFunc" title="GHRFunc ()">GHRFunc</a> func,
 
100
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> user_data);
 
101
<a class="link" href="glib-Basic-Types.html#guint" title="guint">guint</a>               <a class="link" href="glib-Hash-Tables.html#g-hash-table-foreach-steal" title="g_hash_table_foreach_steal ()">g_hash_table_foreach_steal</a>          (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table,
 
102
                                                         <a class="link" href="glib-Hash-Tables.html#GHRFunc" title="GHRFunc ()">GHRFunc</a> func,
 
103
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> user_data);
 
104
void                <a class="link" href="glib-Hash-Tables.html#g-hash-table-remove-all" title="g_hash_table_remove_all ()">g_hash_table_remove_all</a>             (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table);
 
105
void                <a class="link" href="glib-Hash-Tables.html#g-hash-table-steal-all" title="g_hash_table_steal_all ()">g_hash_table_steal_all</a>              (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table);
 
106
<a class="link" href="glib-Doubly-Linked-Lists.html#GList" title="GList">GList</a> *             <a class="link" href="glib-Hash-Tables.html#g-hash-table-get-keys" title="g_hash_table_get_keys ()">g_hash_table_get_keys</a>               (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table);
 
107
<a class="link" href="glib-Doubly-Linked-Lists.html#GList" title="GList">GList</a> *             <a class="link" href="glib-Hash-Tables.html#g-hash-table-get-values" title="g_hash_table_get_values ()">g_hash_table_get_values</a>             (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table);
 
108
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            (<a class="link" href="glib-Hash-Tables.html#GHRFunc" title="GHRFunc ()">*GHRFunc</a>)                          (<a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> key,
 
109
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> value,
 
110
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> user_data);
 
111
#define             <a class="link" href="glib-Hash-Tables.html#g-hash-table-freeze" title="g_hash_table_freeze()">g_hash_table_freeze</a>                 (hash_table)
 
112
#define             <a class="link" href="glib-Hash-Tables.html#g-hash-table-thaw" title="g_hash_table_thaw()">g_hash_table_thaw</a>                   (hash_table)
 
113
void                <a class="link" href="glib-Hash-Tables.html#g-hash-table-destroy" title="g_hash_table_destroy ()">g_hash_table_destroy</a>                (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table);
 
114
<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a>*         <a class="link" href="glib-Hash-Tables.html#g-hash-table-ref" title="g_hash_table_ref ()">g_hash_table_ref</a>                    (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table);
 
115
void                <a class="link" href="glib-Hash-Tables.html#g-hash-table-unref" title="g_hash_table_unref ()">g_hash_table_unref</a>                  (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table);
 
116
                    <a class="link" href="glib-Hash-Tables.html#GHashTableIter" title="GHashTableIter">GHashTableIter</a>;
 
117
void                <a class="link" href="glib-Hash-Tables.html#g-hash-table-iter-init" title="g_hash_table_iter_init ()">g_hash_table_iter_init</a>              (<a class="link" href="glib-Hash-Tables.html#GHashTableIter" title="GHashTableIter">GHashTableIter</a> *iter,
 
118
                                                         <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table);
 
119
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            <a class="link" href="glib-Hash-Tables.html#g-hash-table-iter-next" title="g_hash_table_iter_next ()">g_hash_table_iter_next</a>              (<a class="link" href="glib-Hash-Tables.html#GHashTableIter" title="GHashTableIter">GHashTableIter</a> *iter,
 
120
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> *key,
 
121
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> *value);
 
122
<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a>*         <a class="link" href="glib-Hash-Tables.html#g-hash-table-iter-get-hash-table" title="g_hash_table_iter_get_hash_table ()">g_hash_table_iter_get_hash_table</a>    (<a class="link" href="glib-Hash-Tables.html#GHashTableIter" title="GHashTableIter">GHashTableIter</a> *iter);
 
123
void                <a class="link" href="glib-Hash-Tables.html#g-hash-table-iter-remove" title="g_hash_table_iter_remove ()">g_hash_table_iter_remove</a>            (<a class="link" href="glib-Hash-Tables.html#GHashTableIter" title="GHashTableIter">GHashTableIter</a> *iter);
 
124
void                <a class="link" href="glib-Hash-Tables.html#g-hash-table-iter-steal" title="g_hash_table_iter_steal ()">g_hash_table_iter_steal</a>             (<a class="link" href="glib-Hash-Tables.html#GHashTableIter" title="GHashTableIter">GHashTableIter</a> *iter);
 
125
 
 
126
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            <a class="link" href="glib-Hash-Tables.html#g-direct-equal" title="g_direct_equal ()">g_direct_equal</a>                      (<a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> v1,
 
127
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> v2);
 
128
<a class="link" href="glib-Basic-Types.html#guint" title="guint">guint</a>               <a class="link" href="glib-Hash-Tables.html#g-direct-hash" title="g_direct_hash ()">g_direct_hash</a>                       (<a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> v);
 
129
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            <a class="link" href="glib-Hash-Tables.html#g-int-equal" title="g_int_equal ()">g_int_equal</a>                         (<a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> v1,
 
130
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> v2);
 
131
<a class="link" href="glib-Basic-Types.html#guint" title="guint">guint</a>               <a class="link" href="glib-Hash-Tables.html#g-int-hash" title="g_int_hash ()">g_int_hash</a>                          (<a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> v);
 
132
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            <a class="link" href="glib-Hash-Tables.html#g-str-equal" title="g_str_equal ()">g_str_equal</a>                         (<a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> v1,
 
133
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> v2);
 
134
<a class="link" href="glib-Basic-Types.html#guint" title="guint">guint</a>               <a class="link" href="glib-Hash-Tables.html#g-str-hash" title="g_str_hash ()">g_str_hash</a>                          (<a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> v);
135
135
</pre>
136
136
</div>
137
137
<div class="refsect1" lang="en">
138
 
<a name="id3345239"></a><h2>Description</h2>
 
138
<a name="glib-Hash-Tables.description"></a><h2>Description</h2>
139
139
<p>
140
 
A <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> provides associations between keys and values which
 
140
A <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a> provides associations between keys and values which
141
141
is optimized so that given a key, the associated value can be found
142
142
very quickly.
143
143
</p>
144
144
<p>
145
145
Note that neither keys nor values are copied when inserted into the
146
 
<a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>, so they must exist for the lifetime of the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
 
146
<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>, so they must exist for the lifetime of the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
147
147
This means that the use of static strings is OK, but temporary
148
148
strings (i.e. those created in buffers and those returned by GTK+ widgets)
149
 
should be copied with <a class="link" href="glib-String-Utility-Functions.html#g-strdup"><code class="function">g_strdup()</code></a> before being inserted.
 
149
should be copied with <a class="link" href="glib-String-Utility-Functions.html#g-strdup" title="g_strdup ()"><code class="function">g_strdup()</code></a> before being inserted.
150
150
</p>
151
151
<p>
152
152
If keys or values are dynamically allocated, you must be careful to ensure
153
 
that they are freed when they are removed from the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>, and also
154
 
when they are overwritten by new insertions into the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
 
153
that they are freed when they are removed from the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>, and also
 
154
when they are overwritten by new insertions into the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
155
155
It is also not advisable to mix static strings and dynamically-allocated
156
 
strings in a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>, because it then becomes difficult to determine
 
156
strings in a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>, because it then becomes difficult to determine
157
157
whether the string should be freed.
158
158
</p>
159
159
<p>
160
 
To create a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>, use <a class="link" href="glib-Hash-Tables.html#g-hash-table-new"><code class="function">g_hash_table_new()</code></a>.
161
 
</p>
162
 
<p>
163
 
To insert a key and value into a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>, use <a class="link" href="glib-Hash-Tables.html#g-hash-table-insert"><code class="function">g_hash_table_insert()</code></a>.
164
 
</p>
165
 
<p>
166
 
To lookup a value corresponding to a given key, use <a class="link" href="glib-Hash-Tables.html#g-hash-table-lookup"><code class="function">g_hash_table_lookup()</code></a>
167
 
and <a class="link" href="glib-Hash-Tables.html#g-hash-table-lookup-extended"><code class="function">g_hash_table_lookup_extended()</code></a>.
168
 
</p>
169
 
<p>
170
 
To remove a key and value, use <a class="link" href="glib-Hash-Tables.html#g-hash-table-remove"><code class="function">g_hash_table_remove()</code></a>.
171
 
</p>
172
 
<p>
173
 
To call a function for each key and value pair use <a class="link" href="glib-Hash-Tables.html#g-hash-table-foreach"><code class="function">g_hash_table_foreach()</code></a>
 
160
To create a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>, use <a class="link" href="glib-Hash-Tables.html#g-hash-table-new" title="g_hash_table_new ()"><code class="function">g_hash_table_new()</code></a>.
 
161
</p>
 
162
<p>
 
163
To insert a key and value into a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>, use <a class="link" href="glib-Hash-Tables.html#g-hash-table-insert" title="g_hash_table_insert ()"><code class="function">g_hash_table_insert()</code></a>.
 
164
</p>
 
165
<p>
 
166
To lookup a value corresponding to a given key, use <a class="link" href="glib-Hash-Tables.html#g-hash-table-lookup" title="g_hash_table_lookup ()"><code class="function">g_hash_table_lookup()</code></a>
 
167
and <a class="link" href="glib-Hash-Tables.html#g-hash-table-lookup-extended" title="g_hash_table_lookup_extended ()"><code class="function">g_hash_table_lookup_extended()</code></a>.
 
168
</p>
 
169
<p>
 
170
To remove a key and value, use <a class="link" href="glib-Hash-Tables.html#g-hash-table-remove" title="g_hash_table_remove ()"><code class="function">g_hash_table_remove()</code></a>.
 
171
</p>
 
172
<p>
 
173
To call a function for each key and value pair use <a class="link" href="glib-Hash-Tables.html#g-hash-table-foreach" title="g_hash_table_foreach ()"><code class="function">g_hash_table_foreach()</code></a>
174
174
or use a iterator to iterate over the key/value pairs in the hash table, see
175
 
<a class="link" href="glib-Hash-Tables.html#GHashTableIter"><span class="type">GHashTableIter</span></a>.
 
175
<a class="link" href="glib-Hash-Tables.html#GHashTableIter" title="GHashTableIter"><span class="type">GHashTableIter</span></a>.
176
176
</p>
177
177
<p>
178
 
To destroy a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> use <a class="link" href="glib-Hash-Tables.html#g-hash-table-destroy"><code class="function">g_hash_table_destroy()</code></a>.
 
178
To destroy a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a> use <a class="link" href="glib-Hash-Tables.html#g-hash-table-destroy" title="g_hash_table_destroy ()"><code class="function">g_hash_table_destroy()</code></a>.
179
179
</p>
180
180
</div>
181
181
<div class="refsect1" lang="en">
182
 
<a name="id3345463"></a><h2>Details</h2>
 
182
<a name="glib-Hash-Tables.details"></a><h2>Details</h2>
183
183
<div class="refsect2" lang="en">
184
 
<a name="id3345473"></a><h3>
185
 
<a name="GHashTable"></a>GHashTable</h3>
186
 
<a class="indexterm" name="id3345485"></a><pre class="programlisting">typedef struct _GHashTable GHashTable;</pre>
 
184
<a name="GHashTable"></a><h3>GHashTable</h3>
 
185
<pre class="programlisting">typedef struct _GHashTable GHashTable;</pre>
187
186
<p>
188
187
The <span class="structname">GHashTable</span> struct is an opaque data structure to represent a
189
188
<a class="link" href="glib-Hash-Tables.html" title="Hash Tables">Hash Table</a>.
192
191
</div>
193
192
<hr>
194
193
<div class="refsect2" lang="en">
195
 
<a name="id3345515"></a><h3>
196
 
<a name="g-hash-table-new"></a>g_hash_table_new ()</h3>
197
 
<a class="indexterm" name="id3345527"></a><pre class="programlisting"><a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a>*         g_hash_table_new                    (<a class="link" href="glib-Hash-Tables.html#GHashFunc">GHashFunc</a> hash_func,
198
 
                                                         <a class="link" href="glib-Hash-Tables.html#GEqualFunc">GEqualFunc</a> key_equal_func);</pre>
199
 
<p>
200
 
Creates a new <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> with a reference count of 1.</p>
201
 
<p>
202
 
 
 
194
<a name="g-hash-table-new"></a><h3>g_hash_table_new ()</h3>
 
195
<pre class="programlisting"><a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a>*         g_hash_table_new                    (<a class="link" href="glib-Hash-Tables.html#GHashFunc" title="GHashFunc ()">GHashFunc</a> hash_func,
 
196
                                                         <a class="link" href="glib-Hash-Tables.html#GEqualFunc" title="GEqualFunc ()">GEqualFunc</a> key_equal_func);</pre>
 
197
<p>
 
198
Creates a new <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a> with a reference count of 1.</p>
 
199
<p>
203
200
</p>
204
201
<div class="variablelist"><table border="0">
205
202
<col align="left" valign="top">
206
203
<tbody>
207
204
<tr>
208
 
<td><p><span class="term"><em class="parameter"><code>hash_func</code></em>&#160;:</span></p></td>
 
205
<td><p><span class="term"><em class="parameter"><code>hash_func</code></em> :</span></p></td>
209
206
<td> a function to create a hash value from a key.
210
207
  Hash values are used to determine where keys are stored within the
211
 
  <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> data structure. The <a class="link" href="glib-Hash-Tables.html#g-direct-hash"><code class="function">g_direct_hash()</code></a>, <a class="link" href="glib-Hash-Tables.html#g-int-hash"><code class="function">g_int_hash()</code></a> and
212
 
  <a class="link" href="glib-Hash-Tables.html#g-str-hash"><code class="function">g_str_hash()</code></a> functions are provided for some common types of keys.
213
 
  If hash_func is <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, <a class="link" href="glib-Hash-Tables.html#g-direct-hash"><code class="function">g_direct_hash()</code></a> is used.
 
208
  <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a> data structure. The <a class="link" href="glib-Hash-Tables.html#g-direct-hash" title="g_direct_hash ()"><code class="function">g_direct_hash()</code></a>, <a class="link" href="glib-Hash-Tables.html#g-int-hash" title="g_int_hash ()"><code class="function">g_int_hash()</code></a> and
 
209
  <a class="link" href="glib-Hash-Tables.html#g-str-hash" title="g_str_hash ()"><code class="function">g_str_hash()</code></a> functions are provided for some common types of keys.
 
210
  If hash_func is <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a>, <a class="link" href="glib-Hash-Tables.html#g-direct-hash" title="g_direct_hash ()"><code class="function">g_direct_hash()</code></a> is used.
214
211
</td>
215
212
</tr>
216
213
<tr>
217
 
<td><p><span class="term"><em class="parameter"><code>key_equal_func</code></em>&#160;:</span></p></td>
 
214
<td><p><span class="term"><em class="parameter"><code>key_equal_func</code></em> :</span></p></td>
218
215
<td> a function to check two keys for equality.  This is
219
 
  used when looking up keys in the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.  The <a class="link" href="glib-Hash-Tables.html#g-direct-equal"><code class="function">g_direct_equal()</code></a>,
220
 
  <a class="link" href="glib-Hash-Tables.html#g-int-equal"><code class="function">g_int_equal()</code></a> and <a class="link" href="glib-Hash-Tables.html#g-str-equal"><code class="function">g_str_equal()</code></a> functions are provided for the most
221
 
  common types of keys. If <em class="parameter"><code>key_equal_func</code></em> is <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, keys are compared
222
 
  directly in a similar fashion to <a class="link" href="glib-Hash-Tables.html#g-direct-equal"><code class="function">g_direct_equal()</code></a>, but without the
 
216
  used when looking up keys in the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.  The <a class="link" href="glib-Hash-Tables.html#g-direct-equal" title="g_direct_equal ()"><code class="function">g_direct_equal()</code></a>,
 
217
  <a class="link" href="glib-Hash-Tables.html#g-int-equal" title="g_int_equal ()"><code class="function">g_int_equal()</code></a> and <a class="link" href="glib-Hash-Tables.html#g-str-equal" title="g_str_equal ()"><code class="function">g_str_equal()</code></a> functions are provided for the most
 
218
  common types of keys. If <em class="parameter"><code>key_equal_func</code></em> is <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a>, keys are compared
 
219
  directly in a similar fashion to <a class="link" href="glib-Hash-Tables.html#g-direct-equal" title="g_direct_equal ()"><code class="function">g_direct_equal()</code></a>, but without the
223
220
  overhead of a function call.
224
221
</td>
225
222
</tr>
226
223
<tr>
227
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
228
 
<td> a new <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
 
224
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
225
<td> a new <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
229
226
</td>
230
227
</tr>
231
228
</tbody>
233
230
</div>
234
231
<hr>
235
232
<div class="refsect2" lang="en">
236
 
<a name="id3345759"></a><h3>
237
 
<a name="g-hash-table-new-full"></a>g_hash_table_new_full ()</h3>
238
 
<a class="indexterm" name="id3345772"></a><pre class="programlisting"><a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a>*         g_hash_table_new_full               (<a class="link" href="glib-Hash-Tables.html#GHashFunc">GHashFunc</a> hash_func,
239
 
                                                         <a class="link" href="glib-Hash-Tables.html#GEqualFunc">GEqualFunc</a> key_equal_func,
240
 
                                                         <a class="link" href="glib-Datasets.html#GDestroyNotify">GDestroyNotify</a> key_destroy_func,
241
 
                                                         <a class="link" href="glib-Datasets.html#GDestroyNotify">GDestroyNotify</a> value_destroy_func);</pre>
 
233
<a name="g-hash-table-new-full"></a><h3>g_hash_table_new_full ()</h3>
 
234
<pre class="programlisting"><a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a>*         g_hash_table_new_full               (<a class="link" href="glib-Hash-Tables.html#GHashFunc" title="GHashFunc ()">GHashFunc</a> hash_func,
 
235
                                                         <a class="link" href="glib-Hash-Tables.html#GEqualFunc" title="GEqualFunc ()">GEqualFunc</a> key_equal_func,
 
236
                                                         <a class="link" href="glib-Datasets.html#GDestroyNotify" title="GDestroyNotify ()">GDestroyNotify</a> key_destroy_func,
 
237
                                                         <a class="link" href="glib-Datasets.html#GDestroyNotify" title="GDestroyNotify ()">GDestroyNotify</a> value_destroy_func);</pre>
242
238
<p>
243
 
Creates a new <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> like <a class="link" href="glib-Hash-Tables.html#g-hash-table-new"><code class="function">g_hash_table_new()</code></a> with a reference count
 
239
Creates a new <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a> like <a class="link" href="glib-Hash-Tables.html#g-hash-table-new" title="g_hash_table_new ()"><code class="function">g_hash_table_new()</code></a> with a reference count
244
240
of 1 and allows to specify functions to free the memory allocated for the
245
 
key and value that get called when removing the entry from the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.</p>
 
241
key and value that get called when removing the entry from the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.</p>
246
242
<p>
247
 
 
248
243
</p>
249
244
<div class="variablelist"><table border="0">
250
245
<col align="left" valign="top">
251
246
<tbody>
252
247
<tr>
253
 
<td><p><span class="term"><em class="parameter"><code>hash_func</code></em>&#160;:</span></p></td>
 
248
<td><p><span class="term"><em class="parameter"><code>hash_func</code></em> :</span></p></td>
254
249
<td> a function to create a hash value from a key.
255
250
</td>
256
251
</tr>
257
252
<tr>
258
 
<td><p><span class="term"><em class="parameter"><code>key_equal_func</code></em>&#160;:</span></p></td>
 
253
<td><p><span class="term"><em class="parameter"><code>key_equal_func</code></em> :</span></p></td>
259
254
<td> a function to check two keys for equality.
260
255
</td>
261
256
</tr>
262
257
<tr>
263
 
<td><p><span class="term"><em class="parameter"><code>key_destroy_func</code></em>&#160;:</span></p></td>
 
258
<td><p><span class="term"><em class="parameter"><code>key_destroy_func</code></em> :</span></p></td>
264
259
<td> a function to free the memory allocated for the key
265
 
  used when removing the entry from the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if you
 
260
  used when removing the entry from the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a> or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> if you
266
261
  don't want to supply such a function.
267
262
</td>
268
263
</tr>
269
264
<tr>
270
 
<td><p><span class="term"><em class="parameter"><code>value_destroy_func</code></em>&#160;:</span></p></td>
 
265
<td><p><span class="term"><em class="parameter"><code>value_destroy_func</code></em> :</span></p></td>
271
266
<td> a function to free the memory allocated for the
272
 
  value used when removing the entry from the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if
 
267
  value used when removing the entry from the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a> or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> if
273
268
  you don't want to supply such a function.
274
269
</td>
275
270
</tr>
276
271
<tr>
277
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
278
 
<td> a new <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
 
272
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
273
<td> a new <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
279
274
</td>
280
275
</tr>
281
276
</tbody>
283
278
</div>
284
279
<hr>
285
280
<div class="refsect2" lang="en">
286
 
<a name="id3345978"></a><h3>
287
 
<a name="GHashFunc"></a>GHashFunc ()</h3>
288
 
<a class="indexterm" name="id3345990"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#guint">guint</a>               (*GHashFunc)                        (<a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> key);</pre>
 
281
<a name="GHashFunc"></a><h3>GHashFunc ()</h3>
 
282
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#guint" title="guint">guint</a>               (*GHashFunc)                        (<a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> key);</pre>
289
283
<p>
290
284
Specifies the type of the hash function which is passed to
291
 
<a class="link" href="glib-Hash-Tables.html#g-hash-table-new"><code class="function">g_hash_table_new()</code></a> when a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> is created.
 
285
<a class="link" href="glib-Hash-Tables.html#g-hash-table-new" title="g_hash_table_new ()"><code class="function">g_hash_table_new()</code></a> when a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a> is created.
292
286
</p>
293
287
<p>
294
 
The function is passed a key and should return a <a class="link" href="glib-Basic-Types.html#guint"><span class="type">guint</span></a> hash value.
295
 
The functions <a class="link" href="glib-Hash-Tables.html#g-direct-hash"><code class="function">g_direct_hash()</code></a>, <a class="link" href="glib-Hash-Tables.html#g-int-hash"><code class="function">g_int_hash()</code></a> and <a class="link" href="glib-Hash-Tables.html#g-str-hash"><code class="function">g_str_hash()</code></a> provide
296
 
hash functions which can be used when the key is a <a class="link" href="glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>, <a class="link" href="glib-Basic-Types.html#gint"><span class="type">gint</span></a>, and 
297
 
<a class="link" href="glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* respectively.
 
288
The function is passed a key and should return a <a class="link" href="glib-Basic-Types.html#guint" title="guint"><span class="type">guint</span></a> hash value.
 
289
The functions <a class="link" href="glib-Hash-Tables.html#g-direct-hash" title="g_direct_hash ()"><code class="function">g_direct_hash()</code></a>, <a class="link" href="glib-Hash-Tables.html#g-int-hash" title="g_int_hash ()"><code class="function">g_int_hash()</code></a> and <a class="link" href="glib-Hash-Tables.html#g-str-hash" title="g_str_hash ()"><code class="function">g_str_hash()</code></a> provide
 
290
hash functions which can be used when the key is a <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a>, <a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a>, and
 
291
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a>* respectively.
298
292
</p>
299
293
<p>
300
294
 
308
302
<col align="left" valign="top">
309
303
<tbody>
310
304
<tr>
311
 
<td><p><span class="term"><em class="parameter"><code>key</code></em>&#160;:</span></p></td>
 
305
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
312
306
<td>a key.
313
307
</td>
314
308
</tr>
315
309
<tr>
316
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 
310
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
317
311
<td>the hash value corresponding to the key.
318
 
 
319
 
 
320
312
</td>
321
313
</tr>
322
314
</tbody>
324
316
</div>
325
317
<hr>
326
318
<div class="refsect2" lang="en">
327
 
<a name="id3346147"></a><h3>
328
 
<a name="GEqualFunc"></a>GEqualFunc ()</h3>
329
 
<a class="indexterm" name="id3346158"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            (*GEqualFunc)                       (<a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> a,
330
 
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> b);</pre>
 
319
<a name="GEqualFunc"></a><h3>GEqualFunc ()</h3>
 
320
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            (*GEqualFunc)                       (<a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> a,
 
321
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> b);</pre>
331
322
<p>
332
323
Specifies the type of a function used to test two values for
333
 
equality. The function should return <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if both values are equal and
334
 
<a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.
 
324
equality. The function should return <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> if both values are equal and
 
325
<a class="link" href="glib-Standard-Macros.html#FALSE--CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise.
335
326
</p>
336
327
<div class="variablelist"><table border="0">
337
328
<col align="left" valign="top">
338
329
<tbody>
339
330
<tr>
340
 
<td><p><span class="term"><em class="parameter"><code>a</code></em>&#160;:</span></p></td>
 
331
<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
341
332
<td>a value.
342
333
</td>
343
334
</tr>
344
335
<tr>
345
 
<td><p><span class="term"><em class="parameter"><code>b</code></em>&#160;:</span></p></td>
 
336
<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
346
337
<td>a value to compare with.
347
338
</td>
348
339
</tr>
349
340
<tr>
350
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
351
 
<td>
352
 
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>a</code></em> = <em class="parameter"><code>b</code></em>; <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.
353
 
 
354
 
 
 
341
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
342
<td>%TRUE if <em class="parameter"><code>a</code></em> = <em class="parameter"><code>b</code></em>; <a class="link" href="glib-Standard-Macros.html#FALSE--CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise.
355
343
</td>
356
344
</tr>
357
345
</tbody>
359
347
</div>
360
348
<hr>
361
349
<div class="refsect2" lang="en">
362
 
<a name="id3346290"></a><h3>
363
 
<a name="g-hash-table-insert"></a>g_hash_table_insert ()</h3>
364
 
<a class="indexterm" name="id3346304"></a><pre class="programlisting">void                g_hash_table_insert                 (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
365
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> key,
366
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> value);</pre>
 
350
<a name="g-hash-table-insert"></a><h3>g_hash_table_insert ()</h3>
 
351
<pre class="programlisting">void                g_hash_table_insert                 (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table,
 
352
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> key,
 
353
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> value);</pre>
367
354
<p>
368
 
Inserts a new key and value into a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
 
355
Inserts a new key and value into a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
369
356
</p>
370
357
<p>
371
 
If the key already exists in the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> its current value is replaced
 
358
If the key already exists in the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a> its current value is replaced
372
359
with the new value. If you supplied a <em class="parameter"><code>value_destroy_func</code></em> when creating the
373
 
<a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>, the old value is freed using that function. If you supplied
374
 
a <em class="parameter"><code>key_destroy_func</code></em> when creating the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>, the passed key is freed
 
360
<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>, the old value is freed using that function. If you supplied
 
361
a <em class="parameter"><code>key_destroy_func</code></em> when creating the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>, the passed key is freed
375
362
using that function.</p>
376
363
<p>
377
 
 
378
364
</p>
379
365
<div class="variablelist"><table border="0">
380
366
<col align="left" valign="top">
381
367
<tbody>
382
368
<tr>
383
 
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em>&#160;:</span></p></td>
384
 
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
 
369
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em> :</span></p></td>
 
370
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
385
371
</td>
386
372
</tr>
387
373
<tr>
388
 
<td><p><span class="term"><em class="parameter"><code>key</code></em>&#160;:</span></p></td>
 
374
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
389
375
<td> a key to insert.
390
376
</td>
391
377
</tr>
392
378
<tr>
393
 
<td><p><span class="term"><em class="parameter"><code>value</code></em>&#160;:</span></p></td>
 
379
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
394
380
<td> the value to associate with the key.
395
381
</td>
396
382
</tr>
399
385
</div>
400
386
<hr>
401
387
<div class="refsect2" lang="en">
402
 
<a name="id3346456"></a><h3>
403
 
<a name="g-hash-table-replace"></a>g_hash_table_replace ()</h3>
404
 
<a class="indexterm" name="id3346469"></a><pre class="programlisting">void                g_hash_table_replace                (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
405
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> key,
406
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> value);</pre>
 
388
<a name="g-hash-table-replace"></a><h3>g_hash_table_replace ()</h3>
 
389
<pre class="programlisting">void                g_hash_table_replace                (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table,
 
390
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> key,
 
391
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> value);</pre>
407
392
<p>
408
 
Inserts a new key and value into a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> similar to
409
 
<a class="link" href="glib-Hash-Tables.html#g-hash-table-insert"><code class="function">g_hash_table_insert()</code></a>. The difference is that if the key already exists
410
 
in the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>, it gets replaced by the new key. If you supplied a
411
 
<em class="parameter"><code>value_destroy_func</code></em> when creating the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>, the old value is freed
 
393
Inserts a new key and value into a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a> similar to
 
394
<a class="link" href="glib-Hash-Tables.html#g-hash-table-insert" title="g_hash_table_insert ()"><code class="function">g_hash_table_insert()</code></a>. The difference is that if the key already exists
 
395
in the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>, it gets replaced by the new key. If you supplied a
 
396
<em class="parameter"><code>value_destroy_func</code></em> when creating the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>, the old value is freed
412
397
using that function. If you supplied a <em class="parameter"><code>key_destroy_func</code></em> when creating the
413
 
<a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>, the old key is freed using that function.</p>
 
398
<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>, the old key is freed using that function.</p>
414
399
<p>
415
 
 
416
400
</p>
417
401
<div class="variablelist"><table border="0">
418
402
<col align="left" valign="top">
419
403
<tbody>
420
404
<tr>
421
 
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em>&#160;:</span></p></td>
422
 
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
 
405
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em> :</span></p></td>
 
406
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
423
407
</td>
424
408
</tr>
425
409
<tr>
426
 
<td><p><span class="term"><em class="parameter"><code>key</code></em>&#160;:</span></p></td>
 
410
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
427
411
<td> a key to insert.
428
412
</td>
429
413
</tr>
430
414
<tr>
431
 
<td><p><span class="term"><em class="parameter"><code>value</code></em>&#160;:</span></p></td>
 
415
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
432
416
<td> the value to associate with the key.
433
417
</td>
434
418
</tr>
437
421
</div>
438
422
<hr>
439
423
<div class="refsect2" lang="en">
440
 
<a name="id3346629"></a><h3>
441
 
<a name="g-hash-table-size"></a>g_hash_table_size ()</h3>
442
 
<a class="indexterm" name="id3346643"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#guint">guint</a>               g_hash_table_size                   (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);</pre>
443
 
<p>
444
 
Returns the number of elements contained in the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.</p>
445
 
<p>
446
 
 
 
424
<a name="g-hash-table-size"></a><h3>g_hash_table_size ()</h3>
 
425
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#guint" title="guint">guint</a>               g_hash_table_size                   (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table);</pre>
 
426
<p>
 
427
Returns the number of elements contained in the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.</p>
 
428
<p>
447
429
</p>
448
430
<div class="variablelist"><table border="0">
449
431
<col align="left" valign="top">
450
432
<tbody>
451
433
<tr>
452
 
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em>&#160;:</span></p></td>
453
 
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
 
434
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em> :</span></p></td>
 
435
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
454
436
</td>
455
437
</tr>
456
438
<tr>
457
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
458
 
<td> the number of key/value pairs in the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
 
439
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
440
<td> the number of key/value pairs in the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
459
441
</td>
460
442
</tr>
461
443
</tbody>
463
445
</div>
464
446
<hr>
465
447
<div class="refsect2" lang="en">
466
 
<a name="id3346727"></a><h3>
467
 
<a name="g-hash-table-lookup"></a>g_hash_table_lookup ()</h3>
468
 
<a class="indexterm" name="id3346740"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a>            g_hash_table_lookup                 (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
469
 
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> key);</pre>
 
448
<a name="g-hash-table-lookup"></a><h3>g_hash_table_lookup ()</h3>
 
449
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a>            g_hash_table_lookup                 (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table,
 
450
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> key);</pre>
470
451
<p>
471
 
Looks up a key in a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>. Note that this function cannot
 
452
Looks up a key in a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>. Note that this function cannot
472
453
distinguish between a key that is not present and one which is present
473
 
and has the value <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. If you need this distinction, use
474
 
<a class="link" href="glib-Hash-Tables.html#g-hash-table-lookup-extended"><code class="function">g_hash_table_lookup_extended()</code></a>.</p>
 
454
and has the value <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a>. If you need this distinction, use
 
455
<a class="link" href="glib-Hash-Tables.html#g-hash-table-lookup-extended" title="g_hash_table_lookup_extended ()"><code class="function">g_hash_table_lookup_extended()</code></a>.</p>
475
456
<p>
476
 
 
477
457
</p>
478
458
<div class="variablelist"><table border="0">
479
459
<col align="left" valign="top">
480
460
<tbody>
481
461
<tr>
482
 
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em>&#160;:</span></p></td>
483
 
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
 
462
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em> :</span></p></td>
 
463
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
484
464
</td>
485
465
</tr>
486
466
<tr>
487
 
<td><p><span class="term"><em class="parameter"><code>key</code></em>&#160;:</span></p></td>
 
467
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
488
468
<td> the key to look up.
489
469
</td>
490
470
</tr>
491
471
<tr>
492
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
493
 
<td> the associated value, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the key is not found.
 
472
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
473
<td> the associated value, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> if the key is not found.
494
474
</td>
495
475
</tr>
496
476
</tbody>
498
478
</div>
499
479
<hr>
500
480
<div class="refsect2" lang="en">
501
 
<a name="id3346872"></a><h3>
502
 
<a name="g-hash-table-lookup-extended"></a>g_hash_table_lookup_extended ()</h3>
503
 
<a class="indexterm" name="id3346885"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_hash_table_lookup_extended        (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
504
 
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> lookup_key,
505
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> *orig_key,
506
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> *value);</pre>
 
481
<a name="g-hash-table-lookup-extended"></a><h3>g_hash_table_lookup_extended ()</h3>
 
482
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            g_hash_table_lookup_extended        (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table,
 
483
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> lookup_key,
 
484
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> *orig_key,
 
485
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> *value);</pre>
507
486
<p>
508
 
Looks up a key in the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>, returning the original key and the
509
 
associated value and a <a class="link" href="glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> which is <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the key was found. This
 
487
Looks up a key in the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>, returning the original key and the
 
488
associated value and a <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> which is <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the key was found. This
510
489
is useful if you need to free the memory allocated for the original key,
511
 
for example before calling <a class="link" href="glib-Hash-Tables.html#g-hash-table-remove"><code class="function">g_hash_table_remove()</code></a>.</p>
 
490
for example before calling <a class="link" href="glib-Hash-Tables.html#g-hash-table-remove" title="g_hash_table_remove ()"><code class="function">g_hash_table_remove()</code></a>.</p>
512
491
<p>
513
 
 
514
492
</p>
515
493
<div class="variablelist"><table border="0">
516
494
<col align="left" valign="top">
517
495
<tbody>
518
496
<tr>
519
 
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em>&#160;:</span></p></td>
520
 
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
 
497
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em> :</span></p></td>
 
498
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
521
499
</td>
522
500
</tr>
523
501
<tr>
524
 
<td><p><span class="term"><em class="parameter"><code>lookup_key</code></em>&#160;:</span></p></td>
 
502
<td><p><span class="term"><em class="parameter"><code>lookup_key</code></em> :</span></p></td>
525
503
<td> the key to look up.
526
504
</td>
527
505
</tr>
528
506
<tr>
529
 
<td><p><span class="term"><em class="parameter"><code>orig_key</code></em>&#160;:</span></p></td>
 
507
<td><p><span class="term"><em class="parameter"><code>orig_key</code></em> :</span></p></td>
530
508
<td> returns the original key.
531
509
</td>
532
510
</tr>
533
511
<tr>
534
 
<td><p><span class="term"><em class="parameter"><code>value</code></em>&#160;:</span></p></td>
 
512
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
535
513
<td> returns the value associated with the key.
536
514
</td>
537
515
</tr>
538
516
<tr>
539
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
540
 
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the key was found in the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
 
517
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
518
<td> <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the key was found in the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
541
519
</td>
542
520
</tr>
543
521
</tbody>
545
523
</div>
546
524
<hr>
547
525
<div class="refsect2" lang="en">
548
 
<a name="id3347078"></a><h3>
549
 
<a name="g-hash-table-foreach"></a>g_hash_table_foreach ()</h3>
550
 
<a class="indexterm" name="id3347091"></a><pre class="programlisting">void                g_hash_table_foreach                (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
551
 
                                                         <a class="link" href="glib-Hash-Tables.html#GHFunc">GHFunc</a> func,
552
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);</pre>
 
526
<a name="g-hash-table-foreach"></a><h3>g_hash_table_foreach ()</h3>
 
527
<pre class="programlisting">void                g_hash_table_foreach                (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table,
 
528
                                                         <a class="link" href="glib-Hash-Tables.html#GHFunc" title="GHFunc ()">GHFunc</a> func,
 
529
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> user_data);</pre>
553
530
<p>
554
531
Calls the given function for each of the key/value pairs in the
555
 
<a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.  The function is passed the key and value of each
 
532
<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.  The function is passed the key and value of each
556
533
pair, and the given <em class="parameter"><code>user_data</code></em> parameter.  The hash table may not
557
534
be modified while iterating over it (you can't add/remove
558
535
items). To remove all items matching a predicate, use
559
 
<a class="link" href="glib-Hash-Tables.html#g-hash-table-foreach-remove"><code class="function">g_hash_table_foreach_remove()</code></a>.
 
536
<a class="link" href="glib-Hash-Tables.html#g-hash-table-foreach-remove" title="g_hash_table_foreach_remove ()"><code class="function">g_hash_table_foreach_remove()</code></a>.
560
537
</p>
561
538
<p>
562
 
See <a class="link" href="glib-Hash-Tables.html#g-hash-table-find"><code class="function">g_hash_table_find()</code></a> for performance caveats for linear
563
 
order searches in contrast to <a class="link" href="glib-Hash-Tables.html#g-hash-table-lookup"><code class="function">g_hash_table_lookup()</code></a>.</p>
 
539
See <a class="link" href="glib-Hash-Tables.html#g-hash-table-find" title="g_hash_table_find ()"><code class="function">g_hash_table_find()</code></a> for performance caveats for linear
 
540
order searches in contrast to <a class="link" href="glib-Hash-Tables.html#g-hash-table-lookup" title="g_hash_table_lookup ()"><code class="function">g_hash_table_lookup()</code></a>.</p>
564
541
<p>
565
 
 
566
542
</p>
567
543
<div class="variablelist"><table border="0">
568
544
<col align="left" valign="top">
569
545
<tbody>
570
546
<tr>
571
 
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em>&#160;:</span></p></td>
572
 
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
 
547
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em> :</span></p></td>
 
548
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
573
549
</td>
574
550
</tr>
575
551
<tr>
576
 
<td><p><span class="term"><em class="parameter"><code>func</code></em>&#160;:</span></p></td>
 
552
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
577
553
<td> the function to call for each key/value pair.
578
554
</td>
579
555
</tr>
580
556
<tr>
581
 
<td><p><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></p></td>
 
557
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
582
558
<td> user data to pass to the function.
583
559
</td>
584
560
</tr>
587
563
</div>
588
564
<hr>
589
565
<div class="refsect2" lang="en">
590
 
<a name="id3347248"></a><h3>
591
 
<a name="g-hash-table-find"></a>g_hash_table_find ()</h3>
592
 
<a class="indexterm" name="id3347264"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a>            g_hash_table_find                   (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
593
 
                                                         <a class="link" href="glib-Hash-Tables.html#GHRFunc">GHRFunc</a> predicate,
594
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);</pre>
 
566
<a name="g-hash-table-find"></a><h3>g_hash_table_find ()</h3>
 
567
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a>            g_hash_table_find                   (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table,
 
568
                                                         <a class="link" href="glib-Hash-Tables.html#GHRFunc" title="GHRFunc ()">GHRFunc</a> predicate,
 
569
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> user_data);</pre>
595
570
<p>
596
 
Calls the given function for key/value pairs in the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> until
597
 
<em class="parameter"><code>predicate</code></em> returns <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.  The function is passed the key and value of
 
571
Calls the given function for key/value pairs in the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a> until
 
572
<em class="parameter"><code>predicate</code></em> returns <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a>.  The function is passed the key and value of
598
573
each pair, and the given <em class="parameter"><code>user_data</code></em> parameter. The hash table may not
599
574
be modified while iterating over it (you can't add/remove items).
600
575
</p>
601
576
<p>
602
577
Note, that hash tables are really only optimized for forward lookups,
603
 
i.e. <a class="link" href="glib-Hash-Tables.html#g-hash-table-lookup"><code class="function">g_hash_table_lookup()</code></a>.
604
 
So code that frequently issues <a class="link" href="glib-Hash-Tables.html#g-hash-table-find"><code class="function">g_hash_table_find()</code></a> or
605
 
<a class="link" href="glib-Hash-Tables.html#g-hash-table-foreach"><code class="function">g_hash_table_foreach()</code></a> (e.g. in the order of once per every entry in a
 
578
i.e. <a class="link" href="glib-Hash-Tables.html#g-hash-table-lookup" title="g_hash_table_lookup ()"><code class="function">g_hash_table_lookup()</code></a>.
 
579
So code that frequently issues <a class="link" href="glib-Hash-Tables.html#g-hash-table-find" title="g_hash_table_find ()"><code class="function">g_hash_table_find()</code></a> or
 
580
<a class="link" href="glib-Hash-Tables.html#g-hash-table-foreach" title="g_hash_table_foreach ()"><code class="function">g_hash_table_foreach()</code></a> (e.g. in the order of once per every entry in a
606
581
hash table) should probably be reworked to use additional or different
607
582
data structures for reverse lookups (keep in mind that an O(n) find/foreach
608
583
operation issued for all n values in a hash table ends up needing O(n*n)
609
584
operations).</p>
610
585
<p>
611
 
 
612
586
</p>
613
587
<div class="variablelist"><table border="0">
614
588
<col align="left" valign="top">
615
589
<tbody>
616
590
<tr>
617
 
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em>&#160;:</span></p></td>
618
 
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
 
591
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em> :</span></p></td>
 
592
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
619
593
</td>
620
594
</tr>
621
595
<tr>
622
 
<td><p><span class="term"><em class="parameter"><code>predicate</code></em>&#160;:</span></p></td>
 
596
<td><p><span class="term"><em class="parameter"><code>predicate</code></em> :</span></p></td>
623
597
<td>  function to test the key/value pairs for a certain property.
624
598
</td>
625
599
</tr>
626
600
<tr>
627
 
<td><p><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></p></td>
 
601
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
628
602
<td>  user data to pass to the function.
629
603
</td>
630
604
</tr>
631
605
<tr>
632
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 
606
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
633
607
<td> The value of the first key/value pair is returned, for which
634
 
func evaluates to <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>. If no pair with the requested property is found,
635
 
<a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned.
 
608
func evaluates to <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a>. If no pair with the requested property is found,
 
609
<a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> is returned.
636
610
 
637
611
</td>
638
612
</tr>
639
613
</tbody>
640
614
</table></div>
641
 
<p class="since">Since  2.4
642
 
</p>
 
615
<p class="since">Since 2.4</p>
643
616
</div>
644
617
<hr>
645
618
<div class="refsect2" lang="en">
646
 
<a name="id3347481"></a><h3>
647
 
<a name="GHFunc"></a>GHFunc ()</h3>
648
 
<a class="indexterm" name="id3347494"></a><pre class="programlisting">void                (*GHFunc)                           (<a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> key,
649
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> value,
650
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);</pre>
 
619
<a name="GHFunc"></a><h3>GHFunc ()</h3>
 
620
<pre class="programlisting">void                (*GHFunc)                           (<a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> key,
 
621
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> value,
 
622
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> user_data);</pre>
651
623
<p>
652
 
Specifies the type of the function passed to <a class="link" href="glib-Hash-Tables.html#g-hash-table-foreach"><code class="function">g_hash_table_foreach()</code></a>.
 
624
Specifies the type of the function passed to <a class="link" href="glib-Hash-Tables.html#g-hash-table-foreach" title="g_hash_table_foreach ()"><code class="function">g_hash_table_foreach()</code></a>.
653
625
It is called with each key/value pair, together with the <em class="parameter"><code>user_data</code></em> parameter
654
 
which is passed to <a class="link" href="glib-Hash-Tables.html#g-hash-table-foreach"><code class="function">g_hash_table_foreach()</code></a>.
 
626
which is passed to <a class="link" href="glib-Hash-Tables.html#g-hash-table-foreach" title="g_hash_table_foreach ()"><code class="function">g_hash_table_foreach()</code></a>.
655
627
</p>
656
628
<div class="variablelist"><table border="0">
657
629
<col align="left" valign="top">
658
630
<tbody>
659
631
<tr>
660
 
<td><p><span class="term"><em class="parameter"><code>key</code></em>&#160;:</span></p></td>
 
632
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
661
633
<td>a key.
662
634
</td>
663
635
</tr>
664
636
<tr>
665
 
<td><p><span class="term"><em class="parameter"><code>value</code></em>&#160;:</span></p></td>
 
637
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
666
638
<td>the value corresponding to the key.
667
639
</td>
668
640
</tr>
669
641
<tr>
670
 
<td><p><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></p></td>
671
 
<td>user data passed to <a class="link" href="glib-Hash-Tables.html#g-hash-table-foreach"><code class="function">g_hash_table_foreach()</code></a>.
672
 
 
673
 
 
 
642
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
 
643
<td>user data passed to <a class="link" href="glib-Hash-Tables.html#g-hash-table-foreach" title="g_hash_table_foreach ()"><code class="function">g_hash_table_foreach()</code></a>.
674
644
</td>
675
645
</tr>
676
646
</tbody>
678
648
</div>
679
649
<hr>
680
650
<div class="refsect2" lang="en">
681
 
<a name="id3347625"></a><h3>
682
 
<a name="g-hash-table-remove"></a>g_hash_table_remove ()</h3>
683
 
<a class="indexterm" name="id3347638"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_hash_table_remove                 (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
684
 
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> key);</pre>
 
651
<a name="g-hash-table-remove"></a><h3>g_hash_table_remove ()</h3>
 
652
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            g_hash_table_remove                 (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table,
 
653
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> key);</pre>
685
654
<p>
686
 
Removes a key and its associated value from a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
 
655
Removes a key and its associated value from a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
687
656
</p>
688
657
<p>
689
 
If the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> was created using <a class="link" href="glib-Hash-Tables.html#g-hash-table-new-full"><code class="function">g_hash_table_new_full()</code></a>, the
 
658
If the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a> was created using <a class="link" href="glib-Hash-Tables.html#g-hash-table-new-full" title="g_hash_table_new_full ()"><code class="function">g_hash_table_new_full()</code></a>, the
690
659
key and value are freed using the supplied destroy functions, otherwise
691
660
you have to make sure that any dynamically allocated values are freed
692
661
yourself.</p>
693
662
<p>
694
 
 
695
663
</p>
696
664
<div class="variablelist"><table border="0">
697
665
<col align="left" valign="top">
698
666
<tbody>
699
667
<tr>
700
 
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em>&#160;:</span></p></td>
701
 
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
 
668
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em> :</span></p></td>
 
669
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
702
670
</td>
703
671
</tr>
704
672
<tr>
705
 
<td><p><span class="term"><em class="parameter"><code>key</code></em>&#160;:</span></p></td>
 
673
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
706
674
<td> the key to remove.
707
675
</td>
708
676
</tr>
709
677
<tr>
710
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
711
 
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the key was found and removed from the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
 
678
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
679
<td> <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the key was found and removed from the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
712
680
</td>
713
681
</tr>
714
682
</tbody>
716
684
</div>
717
685
<hr>
718
686
<div class="refsect2" lang="en">
719
 
<a name="id3347779"></a><h3>
720
 
<a name="g-hash-table-steal"></a>g_hash_table_steal ()</h3>
721
 
<a class="indexterm" name="id3347793"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_hash_table_steal                  (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
722
 
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> key);</pre>
 
687
<a name="g-hash-table-steal"></a><h3>g_hash_table_steal ()</h3>
 
688
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            g_hash_table_steal                  (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table,
 
689
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> key);</pre>
723
690
<p>
724
 
Removes a key and its associated value from a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> without
 
691
Removes a key and its associated value from a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a> without
725
692
calling the key and value destroy functions.</p>
726
693
<p>
727
 
 
728
694
</p>
729
695
<div class="variablelist"><table border="0">
730
696
<col align="left" valign="top">
731
697
<tbody>
732
698
<tr>
733
 
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em>&#160;:</span></p></td>
734
 
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
 
699
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em> :</span></p></td>
 
700
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
735
701
</td>
736
702
</tr>
737
703
<tr>
738
 
<td><p><span class="term"><em class="parameter"><code>key</code></em>&#160;:</span></p></td>
 
704
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
739
705
<td> the key to remove.
740
706
</td>
741
707
</tr>
742
708
<tr>
743
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
744
 
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the key was found and removed from the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
 
709
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
710
<td> <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the key was found and removed from the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
745
711
</td>
746
712
</tr>
747
713
</tbody>
749
715
</div>
750
716
<hr>
751
717
<div class="refsect2" lang="en">
752
 
<a name="id3347910"></a><h3>
753
 
<a name="g-hash-table-foreach-remove"></a>g_hash_table_foreach_remove ()</h3>
754
 
<a class="indexterm" name="id3347923"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#guint">guint</a>               g_hash_table_foreach_remove         (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
755
 
                                                         <a class="link" href="glib-Hash-Tables.html#GHRFunc">GHRFunc</a> func,
756
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);</pre>
 
718
<a name="g-hash-table-foreach-remove"></a><h3>g_hash_table_foreach_remove ()</h3>
 
719
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#guint" title="guint">guint</a>               g_hash_table_foreach_remove         (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table,
 
720
                                                         <a class="link" href="glib-Hash-Tables.html#GHRFunc" title="GHRFunc ()">GHRFunc</a> func,
 
721
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> user_data);</pre>
757
722
<p>
758
 
Calls the given function for each key/value pair in the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
759
 
If the function returns <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, then the key/value pair is removed from the
760
 
<a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>. If you supplied key or value destroy functions when creating
761
 
the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>, they are used to free the memory allocated for the removed
 
723
Calls the given function for each key/value pair in the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
 
724
If the function returns <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a>, then the key/value pair is removed from the
 
725
<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>. If you supplied key or value destroy functions when creating
 
726
the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>, they are used to free the memory allocated for the removed
762
727
keys and values.
763
728
</p>
764
729
<p>
765
 
See <span class="type">GHashTableIterator</span> for an alternative way to loop over the 
766
 
key/value pairs in the hash table.</p>
767
 
<p>
768
 
 
769
 
</p>
770
 
<div class="variablelist"><table border="0">
771
 
<col align="left" valign="top">
772
 
<tbody>
773
 
<tr>
774
 
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em>&#160;:</span></p></td>
775
 
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
776
 
</td>
777
 
</tr>
778
 
<tr>
779
 
<td><p><span class="term"><em class="parameter"><code>func</code></em>&#160;:</span></p></td>
780
 
<td> the function to call for each key/value pair.
781
 
</td>
782
 
</tr>
783
 
<tr>
784
 
<td><p><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></p></td>
785
 
<td> user data to pass to the function.
786
 
</td>
787
 
</tr>
788
 
<tr>
789
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
790
 
<td> the number of key/value pairs removed.
791
 
</td>
792
 
</tr>
793
 
</tbody>
794
 
</table></div>
795
 
</div>
796
 
<hr>
797
 
<div class="refsect2" lang="en">
798
 
<a name="id3348088"></a><h3>
799
 
<a name="g-hash-table-foreach-steal"></a>g_hash_table_foreach_steal ()</h3>
800
 
<a class="indexterm" name="id3348102"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#guint">guint</a>               g_hash_table_foreach_steal          (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
801
 
                                                         <a class="link" href="glib-Hash-Tables.html#GHRFunc">GHRFunc</a> func,
802
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);</pre>
803
 
<p>
804
 
Calls the given function for each key/value pair in the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
805
 
If the function returns <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, then the key/value pair is removed from the
806
 
<a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>, but no key or value destroy functions are called.
807
 
</p>
808
 
<p>
809
 
See <span class="type">GHashTableIterator</span> for an alternative way to loop over the 
810
 
key/value pairs in the hash table.</p>
811
 
<p>
812
 
 
813
 
</p>
814
 
<div class="variablelist"><table border="0">
815
 
<col align="left" valign="top">
816
 
<tbody>
817
 
<tr>
818
 
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em>&#160;:</span></p></td>
819
 
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
820
 
</td>
821
 
</tr>
822
 
<tr>
823
 
<td><p><span class="term"><em class="parameter"><code>func</code></em>&#160;:</span></p></td>
824
 
<td> the function to call for each key/value pair.
825
 
</td>
826
 
</tr>
827
 
<tr>
828
 
<td><p><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></p></td>
829
 
<td> user data to pass to the function.
830
 
</td>
831
 
</tr>
832
 
<tr>
833
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
834
 
<td> the number of key/value pairs removed.
835
 
</td>
836
 
</tr>
837
 
</tbody>
838
 
</table></div>
839
 
</div>
840
 
<hr>
841
 
<div class="refsect2" lang="en">
842
 
<a name="id3348256"></a><h3>
843
 
<a name="g-hash-table-remove-all"></a>g_hash_table_remove_all ()</h3>
844
 
<a class="indexterm" name="id3348272"></a><pre class="programlisting">void                g_hash_table_remove_all             (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);</pre>
845
 
<p>
846
 
Removes all keys and their associated values from a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
847
 
</p>
848
 
<p>
849
 
If the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> was created using <a class="link" href="glib-Hash-Tables.html#g-hash-table-new-full"><code class="function">g_hash_table_new_full()</code></a>, the keys
 
730
See <a class="link" href="glib-Hash-Tables.html#GHashTableIter" title="GHashTableIter"><span class="type">GHashTableIter</span></a> for an alternative way to loop over the 
 
731
key/value pairs in the hash table.</p>
 
732
<p>
 
733
</p>
 
734
<div class="variablelist"><table border="0">
 
735
<col align="left" valign="top">
 
736
<tbody>
 
737
<tr>
 
738
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em> :</span></p></td>
 
739
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
 
740
</td>
 
741
</tr>
 
742
<tr>
 
743
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
 
744
<td> the function to call for each key/value pair.
 
745
</td>
 
746
</tr>
 
747
<tr>
 
748
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
 
749
<td> user data to pass to the function.
 
750
</td>
 
751
</tr>
 
752
<tr>
 
753
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
754
<td> the number of key/value pairs removed.
 
755
</td>
 
756
</tr>
 
757
</tbody>
 
758
</table></div>
 
759
</div>
 
760
<hr>
 
761
<div class="refsect2" lang="en">
 
762
<a name="g-hash-table-foreach-steal"></a><h3>g_hash_table_foreach_steal ()</h3>
 
763
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#guint" title="guint">guint</a>               g_hash_table_foreach_steal          (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table,
 
764
                                                         <a class="link" href="glib-Hash-Tables.html#GHRFunc" title="GHRFunc ()">GHRFunc</a> func,
 
765
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> user_data);</pre>
 
766
<p>
 
767
Calls the given function for each key/value pair in the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
 
768
If the function returns <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a>, then the key/value pair is removed from the
 
769
<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>, but no key or value destroy functions are called.
 
770
</p>
 
771
<p>
 
772
See <a class="link" href="glib-Hash-Tables.html#GHashTableIter" title="GHashTableIter"><span class="type">GHashTableIter</span></a> for an alternative way to loop over the 
 
773
key/value pairs in the hash table.</p>
 
774
<p>
 
775
</p>
 
776
<div class="variablelist"><table border="0">
 
777
<col align="left" valign="top">
 
778
<tbody>
 
779
<tr>
 
780
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em> :</span></p></td>
 
781
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
 
782
</td>
 
783
</tr>
 
784
<tr>
 
785
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
 
786
<td> the function to call for each key/value pair.
 
787
</td>
 
788
</tr>
 
789
<tr>
 
790
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
 
791
<td> user data to pass to the function.
 
792
</td>
 
793
</tr>
 
794
<tr>
 
795
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
796
<td> the number of key/value pairs removed.
 
797
</td>
 
798
</tr>
 
799
</tbody>
 
800
</table></div>
 
801
</div>
 
802
<hr>
 
803
<div class="refsect2" lang="en">
 
804
<a name="g-hash-table-remove-all"></a><h3>g_hash_table_remove_all ()</h3>
 
805
<pre class="programlisting">void                g_hash_table_remove_all             (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table);</pre>
 
806
<p>
 
807
Removes all keys and their associated values from a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
 
808
</p>
 
809
<p>
 
810
If the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a> was created using <a class="link" href="glib-Hash-Tables.html#g-hash-table-new-full" title="g_hash_table_new_full ()"><code class="function">g_hash_table_new_full()</code></a>, the keys
850
811
and values are freed using the supplied destroy functions, otherwise you
851
812
have to make sure that any dynamically allocated values are freed
852
813
yourself.</p>
853
814
<p>
854
 
 
855
815
</p>
856
816
<div class="variablelist"><table border="0">
857
817
<col align="left" valign="top">
858
818
<tbody><tr>
859
 
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em>&#160;:</span></p></td>
860
 
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>
 
819
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em> :</span></p></td>
 
820
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>
861
821
</td>
862
822
</tr></tbody>
863
823
</table></div>
864
 
<p class="since">Since  2.12
865
 
</p>
 
824
<p class="since">Since 2.12</p>
866
825
</div>
867
826
<hr>
868
827
<div class="refsect2" lang="en">
869
 
<a name="id3348370"></a><h3>
870
 
<a name="g-hash-table-steal-all"></a>g_hash_table_steal_all ()</h3>
871
 
<a class="indexterm" name="id3348386"></a><pre class="programlisting">void                g_hash_table_steal_all              (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);</pre>
 
828
<a name="g-hash-table-steal-all"></a><h3>g_hash_table_steal_all ()</h3>
 
829
<pre class="programlisting">void                g_hash_table_steal_all              (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table);</pre>
872
830
<p>
873
 
Removes all keys and their associated values from a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>
 
831
Removes all keys and their associated values from a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>
874
832
without calling the key and value destroy functions.</p>
875
833
<p>
876
 
 
877
834
</p>
878
835
<div class="variablelist"><table border="0">
879
836
<col align="left" valign="top">
880
837
<tbody><tr>
881
 
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em>&#160;:</span></p></td>
882
 
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
 
838
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em> :</span></p></td>
 
839
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
883
840
</td>
884
841
</tr></tbody>
885
842
</table></div>
886
 
<p class="since">Since  2.12
887
 
</p>
 
843
<p class="since">Since 2.12</p>
888
844
</div>
889
845
<hr>
890
846
<div class="refsect2" lang="en">
891
 
<a name="id3348460"></a><h3>
892
 
<a name="g-hash-table-get-keys"></a>g_hash_table_get_keys ()</h3>
893
 
<a class="indexterm" name="id3348476"></a><pre class="programlisting"><a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a>*              g_hash_table_get_keys               (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);</pre>
 
847
<a name="g-hash-table-get-keys"></a><h3>g_hash_table_get_keys ()</h3>
 
848
<pre class="programlisting"><a class="link" href="glib-Doubly-Linked-Lists.html#GList" title="GList">GList</a> *             g_hash_table_get_keys               (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table);</pre>
894
849
<p>
895
850
Retrieves every key inside <em class="parameter"><code>hash_table</code></em>. The returned data is valid
896
851
until <em class="parameter"><code>hash_table</code></em> is modified.</p>
897
852
<p>
898
 
 
899
853
</p>
900
854
<div class="variablelist"><table border="0">
901
855
<col align="left" valign="top">
902
856
<tbody>
903
857
<tr>
904
 
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em>&#160;:</span></p></td>
905
 
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>
 
858
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em> :</span></p></td>
 
859
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>
906
860
</td>
907
861
</tr>
908
862
<tr>
909
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
910
 
<td> a <a class="link" href="glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> containing all the keys inside the hash
 
863
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
864
<td> a <a class="link" href="glib-Doubly-Linked-Lists.html#GList" title="GList"><span class="type">GList</span></a> containing all the keys inside the hash
911
865
  table. The content of the list is owned by the hash table and
912
 
  should not be modified or freed. Use <a class="link" href="glib-Doubly-Linked-Lists.html#g-list-free"><code class="function">g_list_free()</code></a> when done
 
866
  should not be modified or freed. Use <a class="link" href="glib-Doubly-Linked-Lists.html#g-list-free" title="g_list_free ()"><code class="function">g_list_free()</code></a> when done
913
867
  using the list.
914
868
 
915
869
</td>
916
870
</tr>
917
871
</tbody>
918
872
</table></div>
919
 
<p class="since">Since  2.14
920
 
</p>
 
873
<p class="since">Since 2.14</p>
921
874
</div>
922
875
<hr>
923
876
<div class="refsect2" lang="en">
924
 
<a name="id3348585"></a><h3>
925
 
<a name="g-hash-table-get-values"></a>g_hash_table_get_values ()</h3>
926
 
<a class="indexterm" name="id3348600"></a><pre class="programlisting"><a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a>*              g_hash_table_get_values             (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);</pre>
 
877
<a name="g-hash-table-get-values"></a><h3>g_hash_table_get_values ()</h3>
 
878
<pre class="programlisting"><a class="link" href="glib-Doubly-Linked-Lists.html#GList" title="GList">GList</a> *             g_hash_table_get_values             (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table);</pre>
927
879
<p>
928
880
Retrieves every value inside <em class="parameter"><code>hash_table</code></em>. The returned data is
929
881
valid until <em class="parameter"><code>hash_table</code></em> is modified.</p>
930
882
<p>
931
 
 
932
883
</p>
933
884
<div class="variablelist"><table border="0">
934
885
<col align="left" valign="top">
935
886
<tbody>
936
887
<tr>
937
 
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em>&#160;:</span></p></td>
938
 
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>
 
888
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em> :</span></p></td>
 
889
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>
939
890
</td>
940
891
</tr>
941
892
<tr>
942
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
943
 
<td> a <a class="link" href="glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> containing all the values inside the hash
 
893
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
894
<td> a <a class="link" href="glib-Doubly-Linked-Lists.html#GList" title="GList"><span class="type">GList</span></a> containing all the values inside the hash
944
895
  table. The content of the list is owned by the hash table and
945
 
  should not be modified or freed. Use <a class="link" href="glib-Doubly-Linked-Lists.html#g-list-free"><code class="function">g_list_free()</code></a> when done
 
896
  should not be modified or freed. Use <a class="link" href="glib-Doubly-Linked-Lists.html#g-list-free" title="g_list_free ()"><code class="function">g_list_free()</code></a> when done
946
897
  using the list.
947
898
 
948
899
</td>
949
900
</tr>
950
901
</tbody>
951
902
</table></div>
952
 
<p class="since">Since  2.14
953
 
</p>
 
903
<p class="since">Since 2.14</p>
954
904
</div>
955
905
<hr>
956
906
<div class="refsect2" lang="en">
957
 
<a name="id3348708"></a><h3>
958
 
<a name="GHRFunc"></a>GHRFunc ()</h3>
959
 
<a class="indexterm" name="id3348720"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            (*GHRFunc)                          (<a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> key,
960
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> value,
961
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);</pre>
 
907
<a name="GHRFunc"></a><h3>GHRFunc ()</h3>
 
908
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            (*GHRFunc)                          (<a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> key,
 
909
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> value,
 
910
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> user_data);</pre>
962
911
<p>
963
 
Specifies the type of the function passed to <a class="link" href="glib-Hash-Tables.html#g-hash-table-foreach-remove"><code class="function">g_hash_table_foreach_remove()</code></a>.
 
912
Specifies the type of the function passed to <a class="link" href="glib-Hash-Tables.html#g-hash-table-foreach-remove" title="g_hash_table_foreach_remove ()"><code class="function">g_hash_table_foreach_remove()</code></a>.
964
913
It is called with each key/value pair, together with the <em class="parameter"><code>user_data</code></em> parameter
965
 
passed to <a class="link" href="glib-Hash-Tables.html#g-hash-table-foreach-remove"><code class="function">g_hash_table_foreach_remove()</code></a>.
966
 
It should return <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the key/value pair should be removed from the
967
 
<a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
 
914
passed to <a class="link" href="glib-Hash-Tables.html#g-hash-table-foreach-remove" title="g_hash_table_foreach_remove ()"><code class="function">g_hash_table_foreach_remove()</code></a>.
 
915
It should return <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the key/value pair should be removed from the
 
916
<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
968
917
</p>
969
918
<div class="variablelist"><table border="0">
970
919
<col align="left" valign="top">
971
920
<tbody>
972
921
<tr>
973
 
<td><p><span class="term"><em class="parameter"><code>key</code></em>&#160;:</span></p></td>
 
922
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
974
923
<td>a key.
975
924
</td>
976
925
</tr>
977
926
<tr>
978
 
<td><p><span class="term"><em class="parameter"><code>value</code></em>&#160;:</span></p></td>
 
927
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
979
928
<td>the value associated with the key.
980
929
</td>
981
930
</tr>
982
931
<tr>
983
 
<td><p><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></p></td>
984
 
<td>user data passed to <a class="link" href="glib-Hash-Tables.html#g-hash-table-remove"><code class="function">g_hash_table_remove()</code></a>.
 
932
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
 
933
<td>user data passed to <a class="link" href="glib-Hash-Tables.html#g-hash-table-remove" title="g_hash_table_remove ()"><code class="function">g_hash_table_remove()</code></a>.
985
934
</td>
986
935
</tr>
987
936
<tr>
988
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
989
 
<td>
990
 
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the key/value pair should be removed from the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
991
 
 
992
 
 
 
937
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
938
<td>%TRUE if the key/value pair should be removed from the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
993
939
</td>
994
940
</tr>
995
941
</tbody>
997
943
</div>
998
944
<hr>
999
945
<div class="refsect2" lang="en">
1000
 
<a name="id3348898"></a><h3>
1001
 
<a name="g-hash-table-freeze"></a>g_hash_table_freeze()</h3>
1002
 
<a class="indexterm" name="id3348914"></a><pre class="programlisting">#define             g_hash_table_freeze(hash_table)</pre>
 
946
<a name="g-hash-table-freeze"></a><h3>g_hash_table_freeze()</h3>
 
947
<pre class="programlisting">#define             g_hash_table_freeze(hash_table)</pre>
1003
948
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
1004
949
<h3 class="title">Warning</h3>
1005
950
<p><code class="literal">g_hash_table_freeze</code> is deprecated and should not be used in newly-written code.</p>
1011
956
<div class="variablelist"><table border="0">
1012
957
<col align="left" valign="top">
1013
958
<tbody><tr>
1014
 
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em>&#160;:</span></p></td>
1015
 
<td>a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>
1016
 
 
1017
 
 
 
959
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em> :</span></p></td>
 
960
<td>a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>
1018
961
</td>
1019
962
</tr></tbody>
1020
963
</table></div>
1021
964
</div>
1022
965
<hr>
1023
966
<div class="refsect2" lang="en">
1024
 
<a name="id3348969"></a><h3>
1025
 
<a name="g-hash-table-thaw"></a>g_hash_table_thaw()</h3>
1026
 
<a class="indexterm" name="id3348984"></a><pre class="programlisting">#define             g_hash_table_thaw(hash_table)</pre>
 
967
<a name="g-hash-table-thaw"></a><h3>g_hash_table_thaw()</h3>
 
968
<pre class="programlisting">#define             g_hash_table_thaw(hash_table)</pre>
1027
969
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
1028
970
<h3 class="title">Warning</h3>
1029
971
<p><code class="literal">g_hash_table_thaw</code> is deprecated and should not be used in newly-written code.</p>
1035
977
<div class="variablelist"><table border="0">
1036
978
<col align="left" valign="top">
1037
979
<tbody><tr>
1038
 
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em>&#160;:</span></p></td>
1039
 
<td>a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>
1040
 
 
1041
 
 
 
980
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em> :</span></p></td>
 
981
<td>a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>
1042
982
</td>
1043
983
</tr></tbody>
1044
984
</table></div>
1045
985
</div>
1046
986
<hr>
1047
987
<div class="refsect2" lang="en">
1048
 
<a name="id3349039"></a><h3>
1049
 
<a name="g-hash-table-destroy"></a>g_hash_table_destroy ()</h3>
1050
 
<a class="indexterm" name="id3349052"></a><pre class="programlisting">void                g_hash_table_destroy                (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);</pre>
 
988
<a name="g-hash-table-destroy"></a><h3>g_hash_table_destroy ()</h3>
 
989
<pre class="programlisting">void                g_hash_table_destroy                (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table);</pre>
1051
990
<p>
1052
 
Destroys all keys and values in the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> and decrements its
 
991
Destroys all keys and values in the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a> and decrements its
1053
992
reference count by 1. If keys and/or values are dynamically allocated,
1054
 
you should either free them first or create the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> with destroy
1055
 
notifiers using <a class="link" href="glib-Hash-Tables.html#g-hash-table-new-full"><code class="function">g_hash_table_new_full()</code></a>. In the latter case the destroy
 
993
you should either free them first or create the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a> with destroy
 
994
notifiers using <a class="link" href="glib-Hash-Tables.html#g-hash-table-new-full" title="g_hash_table_new_full ()"><code class="function">g_hash_table_new_full()</code></a>. In the latter case the destroy
1056
995
functions you supplied will be called on all keys and values during the
1057
996
destruction phase.</p>
1058
997
<p>
1059
 
 
1060
998
</p>
1061
999
<div class="variablelist"><table border="0">
1062
1000
<col align="left" valign="top">
1063
1001
<tbody><tr>
1064
 
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em>&#160;:</span></p></td>
1065
 
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
 
1002
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em> :</span></p></td>
 
1003
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
1066
1004
</td>
1067
1005
</tr></tbody>
1068
1006
</table></div>
1069
1007
</div>
1070
1008
<hr>
1071
1009
<div class="refsect2" lang="en">
1072
 
<a name="id3349142"></a><h3>
1073
 
<a name="g-hash-table-ref"></a>g_hash_table_ref ()</h3>
1074
 
<a class="indexterm" name="id3349157"></a><pre class="programlisting"><a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a>*         g_hash_table_ref                    (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);</pre>
 
1010
<a name="g-hash-table-ref"></a><h3>g_hash_table_ref ()</h3>
 
1011
<pre class="programlisting"><a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a>*         g_hash_table_ref                    (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table);</pre>
1075
1012
<p>
1076
1013
Atomically increments the reference count of <em class="parameter"><code>hash_table</code></em> by one.
1077
1014
This function is MT-safe and may be called from any thread.</p>
1078
1015
<p>
1079
 
 
1080
1016
</p>
1081
1017
<div class="variablelist"><table border="0">
1082
1018
<col align="left" valign="top">
1083
1019
<tbody>
1084
1020
<tr>
1085
 
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em>&#160;:</span></p></td>
1086
 
<td> a valid <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
 
1021
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em> :</span></p></td>
 
1022
<td> a valid <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
1087
1023
</td>
1088
1024
</tr>
1089
1025
<tr>
1090
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
1091
 
<td> the passed in <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
 
1026
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
1027
<td> the passed in <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
1092
1028
 
1093
1029
</td>
1094
1030
</tr>
1095
1031
</tbody>
1096
1032
</table></div>
1097
 
<p class="since">Since  2.10
1098
 
</p>
 
1033
<p class="since">Since 2.10</p>
1099
1034
</div>
1100
1035
<hr>
1101
1036
<div class="refsect2" lang="en">
1102
 
<a name="id3349248"></a><h3>
1103
 
<a name="g-hash-table-unref"></a>g_hash_table_unref ()</h3>
1104
 
<a class="indexterm" name="id3349263"></a><pre class="programlisting">void                g_hash_table_unref                  (<a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);</pre>
 
1037
<a name="g-hash-table-unref"></a><h3>g_hash_table_unref ()</h3>
 
1038
<pre class="programlisting">void                g_hash_table_unref                  (<a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table);</pre>
1105
1039
<p>
1106
1040
Atomically decrements the reference count of <em class="parameter"><code>hash_table</code></em> by one.
1107
1041
If the reference count drops to 0, all keys and values will be
1108
1042
destroyed, and all memory allocated by the hash table is released.
1109
1043
This function is MT-safe and may be called from any thread.</p>
1110
1044
<p>
1111
 
 
1112
1045
</p>
1113
1046
<div class="variablelist"><table border="0">
1114
1047
<col align="left" valign="top">
1115
1048
<tbody><tr>
1116
 
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em>&#160;:</span></p></td>
1117
 
<td> a valid <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
 
1049
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em> :</span></p></td>
 
1050
<td> a valid <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
1118
1051
</td>
1119
1052
</tr></tbody>
1120
1053
</table></div>
1121
 
<p class="since">Since  2.10
1122
 
</p>
 
1054
<p class="since">Since 2.10</p>
1123
1055
</div>
1124
1056
<hr>
1125
1057
<div class="refsect2" lang="en">
1126
 
<a name="id3349337"></a><h3>
1127
 
<a name="GHashTableIter"></a>GHashTableIter</h3>
1128
 
<a class="indexterm" name="id3349349"></a><pre class="programlisting">typedef struct {
 
1058
<a name="GHashTableIter"></a><h3>GHashTableIter</h3>
 
1059
<pre class="programlisting">typedef struct {
1129
1060
} GHashTableIter;
1130
1061
</pre>
1131
1062
<p>
1132
 
 
 
1063
A GHashTableIter structure represents an iterator that can be
 
1064
used to iterate over the elements of a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>. GHashTableIter
 
1065
structures are typically allocated on the stack and then initialized
 
1066
with <a class="link" href="glib-Hash-Tables.html#g-hash-table-iter-init" title="g_hash_table_iter_init ()"><code class="function">g_hash_table_iter_init()</code></a>.
1133
1067
</p>
1134
1068
</div>
1135
1069
<hr>
1136
1070
<div class="refsect2" lang="en">
1137
 
<a name="id3349365"></a><h3>
1138
 
<a name="g-hash-table-iter-init"></a>g_hash_table_iter_init ()</h3>
1139
 
<a class="indexterm" name="id3349380"></a><pre class="programlisting">void                g_hash_table_iter_init              (<a class="link" href="glib-Hash-Tables.html#GHashTableIter">GHashTableIter</a> *iter,
1140
 
                                                         <a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);</pre>
 
1071
<a name="g-hash-table-iter-init"></a><h3>g_hash_table_iter_init ()</h3>
 
1072
<pre class="programlisting">void                g_hash_table_iter_init              (<a class="link" href="glib-Hash-Tables.html#GHashTableIter" title="GHashTableIter">GHashTableIter</a> *iter,
 
1073
                                                         <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a> *hash_table);</pre>
1141
1074
<p>
1142
1075
Initializes a key/value pair iterator and associates it with
1143
1076
<em class="parameter"><code>hash_table</code></em>. Modifying the hash table after calling this function
1154
1087
  }
1155
1088
</pre></div>
1156
1089
<p>
1157
 
 
1158
1090
</p>
1159
1091
<div class="variablelist"><table border="0">
1160
1092
<col align="left" valign="top">
1161
1093
<tbody>
1162
1094
<tr>
1163
 
<td><p><span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></p></td>
1164
 
<td> an uninitialized <a class="link" href="glib-Hash-Tables.html#GHashTableIter"><span class="type">GHashTableIter</span></a>.
 
1095
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
 
1096
<td> an uninitialized <a class="link" href="glib-Hash-Tables.html#GHashTableIter" title="GHashTableIter"><span class="type">GHashTableIter</span></a>.
1165
1097
</td>
1166
1098
</tr>
1167
1099
<tr>
1168
 
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em>&#160;:</span></p></td>
1169
 
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
 
1100
<td><p><span class="term"><em class="parameter"><code>hash_table</code></em> :</span></p></td>
 
1101
<td> a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
1170
1102
</td>
1171
1103
</tr>
1172
1104
</tbody>
1173
1105
</table></div>
1174
 
<p class="since">Since  2.16
1175
 
</p>
 
1106
<p class="since">Since 2.16</p>
1176
1107
</div>
1177
1108
<hr>
1178
1109
<div class="refsect2" lang="en">
1179
 
<a name="id3349492"></a><h3>
1180
 
<a name="g-hash-table-iter-next"></a>g_hash_table_iter_next ()</h3>
1181
 
<a class="indexterm" name="id3349508"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_hash_table_iter_next              (<a class="link" href="glib-Hash-Tables.html#GHashTableIter">GHashTableIter</a> *iter,
1182
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> *key,
1183
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> *value);</pre>
 
1110
<a name="g-hash-table-iter-next"></a><h3>g_hash_table_iter_next ()</h3>
 
1111
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            g_hash_table_iter_next              (<a class="link" href="glib-Hash-Tables.html#GHashTableIter" title="GHashTableIter">GHashTableIter</a> *iter,
 
1112
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> *key,
 
1113
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> *value);</pre>
1184
1114
<p>
1185
1115
Advances <em class="parameter"><code>iter</code></em> and retrieves the key and/or value that are now
1186
 
pointed to as a result of this advancement. If <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned,
 
1116
pointed to as a result of this advancement. If <a class="link" href="glib-Standard-Macros.html#FALSE--CAPS" title="FALSE"><code class="literal">FALSE</code></a> is returned,
1187
1117
<em class="parameter"><code>key</code></em> and <em class="parameter"><code>value</code></em> are not set, and the iterator becomes invalid.</p>
1188
1118
<p>
1189
 
 
1190
 
</p>
1191
 
<div class="variablelist"><table border="0">
1192
 
<col align="left" valign="top">
1193
 
<tbody>
1194
 
<tr>
1195
 
<td><p><span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></p></td>
1196
 
<td> an initialized <a class="link" href="glib-Hash-Tables.html#GHashTableIter"><span class="type">GHashTableIter</span></a>.
1197
 
</td>
1198
 
</tr>
1199
 
<tr>
1200
 
<td><p><span class="term"><em class="parameter"><code>key</code></em>&#160;:</span></p></td>
1201
 
<td> a location to store the key, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
1202
 
</td>
1203
 
</tr>
1204
 
<tr>
1205
 
<td><p><span class="term"><em class="parameter"><code>value</code></em>&#160;:</span></p></td>
1206
 
<td> a location to store the value, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
1207
 
</td>
1208
 
</tr>
1209
 
<tr>
1210
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
1211
 
<td> <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the end of the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> has been reached.
1212
 
 
1213
 
</td>
1214
 
</tr>
1215
 
</tbody>
1216
 
</table></div>
1217
 
<p class="since">Since  2.16
1218
 
</p>
1219
 
</div>
1220
 
<hr>
1221
 
<div class="refsect2" lang="en">
1222
 
<a name="id3349696"></a><h3>
1223
 
<a name="g-hash-table-iter-get-hash-table"></a>g_hash_table_iter_get_hash_table ()</h3>
1224
 
<a class="indexterm" name="id3349712"></a><pre class="programlisting"><a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a>*         g_hash_table_iter_get_hash_table    (<a class="link" href="glib-Hash-Tables.html#GHashTableIter">GHashTableIter</a> *iter);</pre>
1225
 
<p>
1226
 
Returns the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> associated with <em class="parameter"><code>iter</code></em>.</p>
1227
 
<p>
1228
 
 
1229
 
</p>
1230
 
<div class="variablelist"><table border="0">
1231
 
<col align="left" valign="top">
1232
 
<tbody>
1233
 
<tr>
1234
 
<td><p><span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></p></td>
1235
 
<td> an initialized <a class="link" href="glib-Hash-Tables.html#GHashTableIter"><span class="type">GHashTableIter</span></a>.
1236
 
</td>
1237
 
</tr>
1238
 
<tr>
1239
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
1240
 
<td> the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> associated with <em class="parameter"><code>iter</code></em>.
1241
 
 
1242
 
</td>
1243
 
</tr>
1244
 
</tbody>
1245
 
</table></div>
1246
 
<p class="since">Since  2.16
1247
 
</p>
1248
 
</div>
1249
 
<hr>
1250
 
<div class="refsect2" lang="en">
1251
 
<a name="id3349816"></a><h3>
1252
 
<a name="g-hash-table-iter-remove"></a>g_hash_table_iter_remove ()</h3>
1253
 
<a class="indexterm" name="id3349832"></a><pre class="programlisting">void                g_hash_table_iter_remove            (<a class="link" href="glib-Hash-Tables.html#GHashTableIter">GHashTableIter</a> *iter);</pre>
 
1119
</p>
 
1120
<div class="variablelist"><table border="0">
 
1121
<col align="left" valign="top">
 
1122
<tbody>
 
1123
<tr>
 
1124
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
 
1125
<td> an initialized <a class="link" href="glib-Hash-Tables.html#GHashTableIter" title="GHashTableIter"><span class="type">GHashTableIter</span></a>.
 
1126
</td>
 
1127
</tr>
 
1128
<tr>
 
1129
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
 
1130
<td> a location to store the key, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a>.
 
1131
</td>
 
1132
</tr>
 
1133
<tr>
 
1134
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
 
1135
<td> a location to store the value, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a>.
 
1136
</td>
 
1137
</tr>
 
1138
<tr>
 
1139
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
1140
<td> <a class="link" href="glib-Standard-Macros.html#FALSE--CAPS" title="FALSE"><code class="literal">FALSE</code></a> if the end of the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a> has been reached.
 
1141
 
 
1142
</td>
 
1143
</tr>
 
1144
</tbody>
 
1145
</table></div>
 
1146
<p class="since">Since 2.16</p>
 
1147
</div>
 
1148
<hr>
 
1149
<div class="refsect2" lang="en">
 
1150
<a name="g-hash-table-iter-get-hash-table"></a><h3>g_hash_table_iter_get_hash_table ()</h3>
 
1151
<pre class="programlisting"><a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable">GHashTable</a>*         g_hash_table_iter_get_hash_table    (<a class="link" href="glib-Hash-Tables.html#GHashTableIter" title="GHashTableIter">GHashTableIter</a> *iter);</pre>
 
1152
<p>
 
1153
Returns the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a> associated with <em class="parameter"><code>iter</code></em>.</p>
 
1154
<p>
 
1155
</p>
 
1156
<div class="variablelist"><table border="0">
 
1157
<col align="left" valign="top">
 
1158
<tbody>
 
1159
<tr>
 
1160
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
 
1161
<td> an initialized <a class="link" href="glib-Hash-Tables.html#GHashTableIter" title="GHashTableIter"><span class="type">GHashTableIter</span></a>.
 
1162
</td>
 
1163
</tr>
 
1164
<tr>
 
1165
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
1166
<td> the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a> associated with <em class="parameter"><code>iter</code></em>.
 
1167
 
 
1168
</td>
 
1169
</tr>
 
1170
</tbody>
 
1171
</table></div>
 
1172
<p class="since">Since 2.16</p>
 
1173
</div>
 
1174
<hr>
 
1175
<div class="refsect2" lang="en">
 
1176
<a name="g-hash-table-iter-remove"></a><h3>g_hash_table_iter_remove ()</h3>
 
1177
<pre class="programlisting">void                g_hash_table_iter_remove            (<a class="link" href="glib-Hash-Tables.html#GHashTableIter" title="GHashTableIter">GHashTableIter</a> *iter);</pre>
1254
1178
<p>
1255
1179
Removes the key/value pair currently pointed to by the iterator
1256
 
from its associated <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>. Can only be called after
1257
 
<a class="link" href="glib-Hash-Tables.html#g-hash-table-iter-next"><code class="function">g_hash_table_iter_next()</code></a> returned <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, and cannot be called more
 
1180
from its associated <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>. Can only be called after
 
1181
<a class="link" href="glib-Hash-Tables.html#g-hash-table-iter-next" title="g_hash_table_iter_next ()"><code class="function">g_hash_table_iter_next()</code></a> returned <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a>, and cannot be called more
1258
1182
than once for the same key/value pair.
1259
1183
</p>
1260
1184
<p>
1261
 
If the <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> was created using <a class="link" href="glib-Hash-Tables.html#g-hash-table-new-full"><code class="function">g_hash_table_new_full()</code></a>, the
 
1185
If the <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a> was created using <a class="link" href="glib-Hash-Tables.html#g-hash-table-new-full" title="g_hash_table_new_full ()"><code class="function">g_hash_table_new_full()</code></a>, the
1262
1186
key and value are freed using the supplied destroy functions, otherwise
1263
1187
you have to make sure that any dynamically allocated values are freed 
1264
1188
yourself.</p>
1265
1189
<p>
1266
 
 
1267
1190
</p>
1268
1191
<div class="variablelist"><table border="0">
1269
1192
<col align="left" valign="top">
1270
1193
<tbody><tr>
1271
 
<td><p><span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></p></td>
1272
 
<td> an initialized <a class="link" href="glib-Hash-Tables.html#GHashTableIter"><span class="type">GHashTableIter</span></a>.
 
1194
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
 
1195
<td> an initialized <a class="link" href="glib-Hash-Tables.html#GHashTableIter" title="GHashTableIter"><span class="type">GHashTableIter</span></a>.
1273
1196
</td>
1274
1197
</tr></tbody>
1275
1198
</table></div>
1276
 
<p class="since">Since  2.16
1277
 
</p>
 
1199
<p class="since">Since 2.16</p>
1278
1200
</div>
1279
1201
<hr>
1280
1202
<div class="refsect2" lang="en">
1281
 
<a name="id3349954"></a><h3>
1282
 
<a name="g-hash-table-iter-steal"></a>g_hash_table_iter_steal ()</h3>
1283
 
<a class="indexterm" name="id3349969"></a><pre class="programlisting">void                g_hash_table_iter_steal             (<a class="link" href="glib-Hash-Tables.html#GHashTableIter">GHashTableIter</a> *iter);</pre>
 
1203
<a name="g-hash-table-iter-steal"></a><h3>g_hash_table_iter_steal ()</h3>
 
1204
<pre class="programlisting">void                g_hash_table_iter_steal             (<a class="link" href="glib-Hash-Tables.html#GHashTableIter" title="GHashTableIter">GHashTableIter</a> *iter);</pre>
1284
1205
<p>
1285
1206
Removes the key/value pair currently pointed to by the iterator
1286
 
from its associated <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>, without calling the key and value
 
1207
from its associated <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>, without calling the key and value
1287
1208
destroy functions. Can only be called after
1288
 
<a class="link" href="glib-Hash-Tables.html#g-hash-table-iter-next"><code class="function">g_hash_table_iter_next()</code></a> returned <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, and cannot be called more
 
1209
<a class="link" href="glib-Hash-Tables.html#g-hash-table-iter-next" title="g_hash_table_iter_next ()"><code class="function">g_hash_table_iter_next()</code></a> returned <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a>, and cannot be called more
1289
1210
than once for the same key/value pair.</p>
1290
1211
<p>
1291
 
 
1292
1212
</p>
1293
1213
<div class="variablelist"><table border="0">
1294
1214
<col align="left" valign="top">
1295
1215
<tbody><tr>
1296
 
<td><p><span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></p></td>
1297
 
<td> an initialized <a class="link" href="glib-Hash-Tables.html#GHashTableIter"><span class="type">GHashTableIter</span></a>.
 
1216
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
 
1217
<td> an initialized <a class="link" href="glib-Hash-Tables.html#GHashTableIter" title="GHashTableIter"><span class="type">GHashTableIter</span></a>.
1298
1218
</td>
1299
1219
</tr></tbody>
1300
1220
</table></div>
1301
 
<p class="since">Since  2.16
1302
 
</p>
 
1221
<p class="since">Since 2.16</p>
1303
1222
</div>
1304
1223
<hr>
1305
1224
<div class="refsect2" lang="en">
1306
 
<a name="id3350068"></a><h3>
1307
 
<a name="g-direct-equal"></a>g_direct_equal ()</h3>
1308
 
<a class="indexterm" name="id3350081"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_direct_equal                      (<a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v1,
1309
 
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v2);</pre>
1310
 
<p>
1311
 
Compares two <a class="link" href="glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> arguments and returns <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if they are equal.
1312
 
It can be passed to <a class="link" href="glib-Hash-Tables.html#g-hash-table-new"><code class="function">g_hash_table_new()</code></a> as the <em class="parameter"><code>key_equal_func</code></em>
1313
 
parameter, when using pointers as keys in a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.</p>
1314
 
<p>
1315
 
 
 
1225
<a name="g-direct-equal"></a><h3>g_direct_equal ()</h3>
 
1226
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            g_direct_equal                      (<a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> v1,
 
1227
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> v2);</pre>
 
1228
<p>
 
1229
Compares two <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> arguments and returns <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> if they are equal.
 
1230
It can be passed to <a class="link" href="glib-Hash-Tables.html#g-hash-table-new" title="g_hash_table_new ()"><code class="function">g_hash_table_new()</code></a> as the <em class="parameter"><code>key_equal_func</code></em>
 
1231
parameter, when using pointers as keys in a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.</p>
 
1232
<p>
1316
1233
</p>
1317
1234
<div class="variablelist"><table border="0">
1318
1235
<col align="left" valign="top">
1319
1236
<tbody>
1320
1237
<tr>
1321
 
<td><p><span class="term"><em class="parameter"><code>v1</code></em>&#160;:</span></p></td>
 
1238
<td><p><span class="term"><em class="parameter"><code>v1</code></em> :</span></p></td>
1322
1239
<td> a key.
1323
1240
</td>
1324
1241
</tr>
1325
1242
<tr>
1326
 
<td><p><span class="term"><em class="parameter"><code>v2</code></em>&#160;:</span></p></td>
 
1243
<td><p><span class="term"><em class="parameter"><code>v2</code></em> :</span></p></td>
1327
1244
<td> a key to compare with <em class="parameter"><code>v1</code></em>.
1328
1245
</td>
1329
1246
</tr>
1330
1247
<tr>
1331
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
1332
 
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the two keys match.
 
1248
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
1249
<td> <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the two keys match.
1333
1250
</td>
1334
1251
</tr>
1335
1252
</tbody>
1337
1254
</div>
1338
1255
<hr>
1339
1256
<div class="refsect2" lang="en">
1340
 
<a name="id3350224"></a><h3>
1341
 
<a name="g-direct-hash"></a>g_direct_hash ()</h3>
1342
 
<a class="indexterm" name="id3350237"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#guint">guint</a>               g_direct_hash                       (<a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v);</pre>
 
1257
<a name="g-direct-hash"></a><h3>g_direct_hash ()</h3>
 
1258
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#guint" title="guint">guint</a>               g_direct_hash                       (<a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> v);</pre>
1343
1259
<p>
1344
1260
Converts a gpointer to a hash value.
1345
 
It can be passed to <a class="link" href="glib-Hash-Tables.html#g-hash-table-new"><code class="function">g_hash_table_new()</code></a> as the <em class="parameter"><code>hash_func</code></em> parameter, 
1346
 
when using pointers as keys in a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.</p>
1347
 
<p>
1348
 
 
1349
 
</p>
1350
 
<div class="variablelist"><table border="0">
1351
 
<col align="left" valign="top">
1352
 
<tbody>
1353
 
<tr>
1354
 
<td><p><span class="term"><em class="parameter"><code>v</code></em>&#160;:</span></p></td>
1355
 
<td> a <a class="link" href="glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> key
1356
 
</td>
1357
 
</tr>
1358
 
<tr>
1359
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
1360
 
<td> a hash value corresponding to the key.
1361
 
</td>
1362
 
</tr>
1363
 
</tbody>
1364
 
</table></div>
1365
 
</div>
1366
 
<hr>
1367
 
<div class="refsect2" lang="en">
1368
 
<a name="id3350332"></a><h3>
1369
 
<a name="g-int-equal"></a>g_int_equal ()</h3>
1370
 
<a class="indexterm" name="id3350344"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_int_equal                         (<a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v1,
1371
 
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v2);</pre>
1372
 
<p>
1373
 
Compares the two <a class="link" href="glib-Basic-Types.html#gint"><span class="type">gint</span></a> values being pointed to and returns 
1374
 
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if they are equal.
1375
 
It can be passed to <a class="link" href="glib-Hash-Tables.html#g-hash-table-new"><code class="function">g_hash_table_new()</code></a> as the <em class="parameter"><code>key_equal_func</code></em>
1376
 
parameter, when using pointers to integers as keys in a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.</p>
1377
 
<p>
1378
 
 
1379
 
</p>
1380
 
<div class="variablelist"><table border="0">
1381
 
<col align="left" valign="top">
1382
 
<tbody>
1383
 
<tr>
1384
 
<td><p><span class="term"><em class="parameter"><code>v1</code></em>&#160;:</span></p></td>
1385
 
<td> a pointer to a <a class="link" href="glib-Basic-Types.html#gint"><span class="type">gint</span></a> key.
1386
 
</td>
1387
 
</tr>
1388
 
<tr>
1389
 
<td><p><span class="term"><em class="parameter"><code>v2</code></em>&#160;:</span></p></td>
1390
 
<td> a pointer to a <a class="link" href="glib-Basic-Types.html#gint"><span class="type">gint</span></a> key to compare with <em class="parameter"><code>v1</code></em>.
1391
 
</td>
1392
 
</tr>
1393
 
<tr>
1394
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
1395
 
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the two keys match.
1396
 
</td>
1397
 
</tr>
1398
 
</tbody>
1399
 
</table></div>
1400
 
</div>
1401
 
<hr>
1402
 
<div class="refsect2" lang="en">
1403
 
<a name="id3350503"></a><h3>
1404
 
<a name="g-int-hash"></a>g_int_hash ()</h3>
1405
 
<a class="indexterm" name="id3350515"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#guint">guint</a>               g_int_hash                          (<a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v);</pre>
1406
 
<p>
1407
 
Converts a pointer to a <a class="link" href="glib-Basic-Types.html#gint"><span class="type">gint</span></a> to a hash value.
1408
 
It can be passed to <a class="link" href="glib-Hash-Tables.html#g-hash-table-new"><code class="function">g_hash_table_new()</code></a> as the <em class="parameter"><code>hash_func</code></em> parameter, 
1409
 
when using pointers to integers values as keys in a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.</p>
1410
 
<p>
1411
 
 
1412
 
</p>
1413
 
<div class="variablelist"><table border="0">
1414
 
<col align="left" valign="top">
1415
 
<tbody>
1416
 
<tr>
1417
 
<td><p><span class="term"><em class="parameter"><code>v</code></em>&#160;:</span></p></td>
1418
 
<td> a pointer to a <a class="link" href="glib-Basic-Types.html#gint"><span class="type">gint</span></a> key
1419
 
</td>
1420
 
</tr>
1421
 
<tr>
1422
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
1423
 
<td> a hash value corresponding to the key.
1424
 
</td>
1425
 
</tr>
1426
 
</tbody>
1427
 
</table></div>
1428
 
</div>
1429
 
<hr>
1430
 
<div class="refsect2" lang="en">
1431
 
<a name="id3350618"></a><h3>
1432
 
<a name="g-str-equal"></a>g_str_equal ()</h3>
1433
 
<a class="indexterm" name="id3350630"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_str_equal                         (<a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v1,
1434
 
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v2);</pre>
1435
 
<p>
1436
 
Compares two strings for byte-by-byte equality and returns <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> 
1437
 
if they are equal. It can be passed to <a class="link" href="glib-Hash-Tables.html#g-hash-table-new"><code class="function">g_hash_table_new()</code></a> as the 
1438
 
<em class="parameter"><code>key_equal_func</code></em> parameter, when using strings as keys in a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.</p>
1439
 
<p>
1440
 
</p>
1441
 
<div class="variablelist"><table border="0">
1442
 
<col align="left" valign="top">
1443
 
<tbody>
1444
 
<tr>
1445
 
<td><p><span class="term"><em class="parameter"><code>v1</code></em>&#160;:</span></p></td>
 
1261
It can be passed to <a class="link" href="glib-Hash-Tables.html#g-hash-table-new" title="g_hash_table_new ()"><code class="function">g_hash_table_new()</code></a> as the <em class="parameter"><code>hash_func</code></em> parameter, 
 
1262
when using pointers as keys in a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.</p>
 
1263
<p>
 
1264
</p>
 
1265
<div class="variablelist"><table border="0">
 
1266
<col align="left" valign="top">
 
1267
<tbody>
 
1268
<tr>
 
1269
<td><p><span class="term"><em class="parameter"><code>v</code></em> :</span></p></td>
 
1270
<td> a <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> key
 
1271
</td>
 
1272
</tr>
 
1273
<tr>
 
1274
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
1275
<td> a hash value corresponding to the key.
 
1276
</td>
 
1277
</tr>
 
1278
</tbody>
 
1279
</table></div>
 
1280
</div>
 
1281
<hr>
 
1282
<div class="refsect2" lang="en">
 
1283
<a name="g-int-equal"></a><h3>g_int_equal ()</h3>
 
1284
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            g_int_equal                         (<a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> v1,
 
1285
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> v2);</pre>
 
1286
<p>
 
1287
Compares the two <a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> values being pointed to and returns 
 
1288
<a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> if they are equal.
 
1289
It can be passed to <a class="link" href="glib-Hash-Tables.html#g-hash-table-new" title="g_hash_table_new ()"><code class="function">g_hash_table_new()</code></a> as the <em class="parameter"><code>key_equal_func</code></em>
 
1290
parameter, when using pointers to integers as keys in a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.</p>
 
1291
<p>
 
1292
</p>
 
1293
<div class="variablelist"><table border="0">
 
1294
<col align="left" valign="top">
 
1295
<tbody>
 
1296
<tr>
 
1297
<td><p><span class="term"><em class="parameter"><code>v1</code></em> :</span></p></td>
 
1298
<td> a pointer to a <a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> key.
 
1299
</td>
 
1300
</tr>
 
1301
<tr>
 
1302
<td><p><span class="term"><em class="parameter"><code>v2</code></em> :</span></p></td>
 
1303
<td> a pointer to a <a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> key to compare with <em class="parameter"><code>v1</code></em>.
 
1304
</td>
 
1305
</tr>
 
1306
<tr>
 
1307
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
1308
<td> <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the two keys match.
 
1309
</td>
 
1310
</tr>
 
1311
</tbody>
 
1312
</table></div>
 
1313
</div>
 
1314
<hr>
 
1315
<div class="refsect2" lang="en">
 
1316
<a name="g-int-hash"></a><h3>g_int_hash ()</h3>
 
1317
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#guint" title="guint">guint</a>               g_int_hash                          (<a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> v);</pre>
 
1318
<p>
 
1319
Converts a pointer to a <a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> to a hash value.
 
1320
It can be passed to <a class="link" href="glib-Hash-Tables.html#g-hash-table-new" title="g_hash_table_new ()"><code class="function">g_hash_table_new()</code></a> as the <em class="parameter"><code>hash_func</code></em> parameter, 
 
1321
when using pointers to integers values as keys in a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.</p>
 
1322
<p>
 
1323
</p>
 
1324
<div class="variablelist"><table border="0">
 
1325
<col align="left" valign="top">
 
1326
<tbody>
 
1327
<tr>
 
1328
<td><p><span class="term"><em class="parameter"><code>v</code></em> :</span></p></td>
 
1329
<td> a pointer to a <a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> key
 
1330
</td>
 
1331
</tr>
 
1332
<tr>
 
1333
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
1334
<td> a hash value corresponding to the key.
 
1335
</td>
 
1336
</tr>
 
1337
</tbody>
 
1338
</table></div>
 
1339
</div>
 
1340
<hr>
 
1341
<div class="refsect2" lang="en">
 
1342
<a name="g-str-equal"></a><h3>g_str_equal ()</h3>
 
1343
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            g_str_equal                         (<a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> v1,
 
1344
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> v2);</pre>
 
1345
<p>
 
1346
Compares two strings for byte-by-byte equality and returns <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> 
 
1347
if they are equal. It can be passed to <a class="link" href="glib-Hash-Tables.html#g-hash-table-new" title="g_hash_table_new ()"><code class="function">g_hash_table_new()</code></a> as the 
 
1348
<em class="parameter"><code>key_equal_func</code></em> parameter, when using strings as keys in a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.</p>
 
1349
<p>
 
1350
</p>
 
1351
<div class="variablelist"><table border="0">
 
1352
<col align="left" valign="top">
 
1353
<tbody>
 
1354
<tr>
 
1355
<td><p><span class="term"><em class="parameter"><code>v1</code></em> :</span></p></td>
1446
1356
<td> a key
1447
1357
</td>
1448
1358
</tr>
1449
1359
<tr>
1450
 
<td><p><span class="term"><em class="parameter"><code>v2</code></em>&#160;:</span></p></td>
 
1360
<td><p><span class="term"><em class="parameter"><code>v2</code></em> :</span></p></td>
1451
1361
<td> a key to compare with <em class="parameter"><code>v1</code></em>
1452
1362
</td>
1453
1363
</tr>
1454
1364
<tr>
1455
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
1456
 
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the two keys match
 
1365
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
1366
<td> <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the two keys match
1457
1367
</td>
1458
1368
</tr>
1459
1369
</tbody>
1461
1371
</div>
1462
1372
<hr>
1463
1373
<div class="refsect2" lang="en">
1464
 
<a name="id3350765"></a><h3>
1465
 
<a name="g-str-hash"></a>g_str_hash ()</h3>
1466
 
<a class="indexterm" name="id3350778"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#guint">guint</a>               g_str_hash                          (<a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v);</pre>
 
1374
<a name="g-str-hash"></a><h3>g_str_hash ()</h3>
 
1375
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#guint" title="guint">guint</a>               g_str_hash                          (<a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a> v);</pre>
1467
1376
<p>
1468
1377
Converts a string to a hash value.
1469
 
It can be passed to <a class="link" href="glib-Hash-Tables.html#g-hash-table-new"><code class="function">g_hash_table_new()</code></a> as the <em class="parameter"><code>hash_func</code></em> 
1470
 
parameter, when using strings as keys in a <a class="link" href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.</p>
 
1378
It can be passed to <a class="link" href="glib-Hash-Tables.html#g-hash-table-new" title="g_hash_table_new ()"><code class="function">g_hash_table_new()</code></a> as the <em class="parameter"><code>hash_func</code></em> 
 
1379
parameter, when using strings as keys in a <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.</p>
1471
1380
<p>
1472
1381
</p>
1473
1382
<div class="variablelist"><table border="0">
1474
1383
<col align="left" valign="top">
1475
1384
<tbody>
1476
1385
<tr>
1477
 
<td><p><span class="term"><em class="parameter"><code>v</code></em>&#160;:</span></p></td>
 
1386
<td><p><span class="term"><em class="parameter"><code>v</code></em> :</span></p></td>
1478
1387
<td> a string key
1479
1388
</td>
1480
1389
</tr>
1481
1390
<tr>
1482
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 
1391
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1483
1392
<td> a hash value corresponding to the key
1484
1393
</td>
1485
1394
</tr>
1487
1396
</table></div>
1488
1397
</div>
1489
1398
</div>
1490
 
<div class="refsect1" lang="en">
1491
 
<a name="id3350866"></a><div class="refsect2" lang="en"><a name="id3350867"></a></div>
 
1399
</div>
 
1400
<div class="footer">
1492
1401
<hr>
1493
 
<div class="refsect2" lang="en"><a name="id3350868"></a></div>
1494
 
</div>
1495
 
</div>
 
1402
          Generated by GTK-Doc V1.11</div>
1496
1403
</body>
1497
1404
</html>