~ubuntu-branches/ubuntu/gutsy/glib2.0/gutsy

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2007-07-23 10:03:37 UTC
  • mfrom: (1.2.26 upstream)
  • Revision ID: james.westby@ubuntu.com-20070723100337-s4t314uesugvc8fr
Tags: 2.13.7-1ubuntu1
* Sync with Debian and new upstream version:
  - The memory corruption warning from the slice allocator that
    occurred when threads were initialized after the slice allocator
    has been removed, as the slice allocator now works fine
    in this scenario (LP: #116870)
  - New functions g_once_init_enter() and g_once_init_leave() make
    it easier to write threadsafe one-time initialization functions 
  - Bugs fixed:
    454473 Simple XML Subset Parser terminates on invalid XML
    445813 g_module_open error, add file name
    453796 errno gets clobbered by g_filename_display_name
    341988 don't use "-c" with msgfmt in Makefile.in.in
    447048 Please produce slightly more output during long tests
    454785 GModule documentation lists same block of code twice.
    454786 GModule documentation lists same paragraph twice.
    383155 small docs quirks in gobject/closure API documentation
    65041  _get_type() functions aren't thread safe
* debian/control.in:
  - the package is maintained by the Ubuntu Desktop Team 
* debian/patches/series:
  - use 01_gettext-desktopfiles.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
<th width="100%" align="center">GLib Reference Manual</th>
36
36
<td><a accesskey="n" href="glib-Strings.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
37
37
</tr>
38
 
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id3245554" class="shortcut">Top</a>
 
38
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id3069765" class="shortcut">Top</a>
39
39
                  &#160;|&#160;
40
 
                  <a href="#id3246513" class="shortcut">Description</a></nobr></td></tr>
 
40
                  <a href="#id3070724" class="shortcut">Description</a></nobr></td></tr>
41
41
</table>
42
42
<div class="refentry" lang="en">
43
43
<a name="glib-Hash-Tables"></a><div class="titlepage"></div>
44
44
<div class="refnamediv"><table width="100%"><tr>
45
45
<td valign="top">
46
46
<h2>
47
 
<a name="id3245554"></a><span class="refentrytitle">Hash Tables</span>
 
47
<a name="id3069765"></a><span class="refentrytitle">Hash Tables</span>
48
48
</h2>
49
49
<p>Hash Tables &#8212; associations between keys and values so that given a key the value
50
50
can be found quickly.</p>
125
125
</pre>
126
126
</div>
127
127
<div class="refsect1" lang="en">
128
 
<a name="id3246513"></a><h2>Description</h2>
 
128
<a name="id3070724"></a><h2>Description</h2>
129
129
<p>
130
130
A <a href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> provides associations between keys and values which
131
131
is optimized so that given a key, the associated value can be found
167
167
</p>
168
168
</div>
169
169
<div class="refsect1" lang="en">
170
 
<a name="id3246727"></a><h2>Details</h2>
 
170
<a name="id3070938"></a><h2>Details</h2>
171
171
<div class="refsect2" lang="en">
172
 
<a name="id3246737"></a><h3>
 
172
<a name="id3070948"></a><h3>
173
173
<a name="GHashTable"></a>GHashTable</h3>
174
 
<a class="indexterm" name="id3246749"></a><pre class="programlisting">typedef struct _GHashTable GHashTable;</pre>
 
174
<a class="indexterm" name="id3070960"></a><pre class="programlisting">typedef struct _GHashTable GHashTable;</pre>
175
175
<p>
176
176
The <span class="structname">GHashTable</span> struct is an opaque data structure to represent a
177
177
<a href="glib-Hash-Tables.html" title="Hash Tables">Hash Table</a>.
180
180
</div>
181
181
<hr>
182
182
<div class="refsect2" lang="en">
183
 
<a name="id3246779"></a><h3>
 
183
<a name="id3070990"></a><h3>
184
184
<a name="g-hash-table-new"></a>g_hash_table_new ()</h3>
185
 
<a class="indexterm" name="id3246791"></a><pre class="programlisting"><a href="glib-Hash-Tables.html#GHashTable">GHashTable</a>*         g_hash_table_new                    (<a href="glib-Hash-Tables.html#GHashFunc">GHashFunc</a> hash_func,
 
185
<a class="indexterm" name="id3071002"></a><pre class="programlisting"><a href="glib-Hash-Tables.html#GHashTable">GHashTable</a>*         g_hash_table_new                    (<a href="glib-Hash-Tables.html#GHashFunc">GHashFunc</a> hash_func,
186
186
                                                         <a href="glib-Hash-Tables.html#GEqualFunc">GEqualFunc</a> key_equal_func);</pre>
187
187
<p>
188
188
Creates a new <a href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> with a reference count of 1.</p>
221
221
</div>
222
222
<hr>
223
223
<div class="refsect2" lang="en">
224
 
<a name="id3247023"></a><h3>
 
224
<a name="id3071234"></a><h3>
225
225
<a name="g-hash-table-new-full"></a>g_hash_table_new_full ()</h3>
226
 
<a class="indexterm" name="id3247036"></a><pre class="programlisting"><a href="glib-Hash-Tables.html#GHashTable">GHashTable</a>*         g_hash_table_new_full               (<a href="glib-Hash-Tables.html#GHashFunc">GHashFunc</a> hash_func,
 
226
<a class="indexterm" name="id3071247"></a><pre class="programlisting"><a href="glib-Hash-Tables.html#GHashTable">GHashTable</a>*         g_hash_table_new_full               (<a href="glib-Hash-Tables.html#GHashFunc">GHashFunc</a> hash_func,
227
227
                                                         <a href="glib-Hash-Tables.html#GEqualFunc">GEqualFunc</a> key_equal_func,
228
228
                                                         <a href="glib-Datasets.html#GDestroyNotify">GDestroyNotify</a> key_destroy_func,
229
229
                                                         <a href="glib-Datasets.html#GDestroyNotify">GDestroyNotify</a> value_destroy_func);</pre>
271
271
</div>
272
272
<hr>
273
273
<div class="refsect2" lang="en">
274
 
<a name="id3247242"></a><h3>
 
274
<a name="id3071453"></a><h3>
275
275
<a name="GHashFunc"></a>GHashFunc ()</h3>
276
 
<a class="indexterm" name="id3247254"></a><pre class="programlisting"><a href="glib-Basic-Types.html#guint">guint</a>               (*GHashFunc)                        (<a href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> key);</pre>
 
276
<a class="indexterm" name="id3071465"></a><pre class="programlisting"><a href="glib-Basic-Types.html#guint">guint</a>               (*GHashFunc)                        (<a href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> key);</pre>
277
277
<p>
278
278
Specifies the type of the hash function which is passed to
279
279
<a href="glib-Hash-Tables.html#g-hash-table-new"><code class="function">g_hash_table_new()</code></a> when a <a href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> is created.
312
312
</div>
313
313
<hr>
314
314
<div class="refsect2" lang="en">
315
 
<a name="id3247408"></a><h3>
 
315
<a name="id3071619"></a><h3>
316
316
<a name="GEqualFunc"></a>GEqualFunc ()</h3>
317
 
<a class="indexterm" name="id3247420"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a>            (*GEqualFunc)                       (<a href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> a,
 
317
<a class="indexterm" name="id3071631"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a>            (*GEqualFunc)                       (<a href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> a,
318
318
                                                         <a href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> b);</pre>
319
319
<p>
320
320
Specifies the type of a function used to test two values for
347
347
</div>
348
348
<hr>
349
349
<div class="refsect2" lang="en">
350
 
<a name="id3247552"></a><h3>
 
350
<a name="id3071763"></a><h3>
351
351
<a name="g-hash-table-insert"></a>g_hash_table_insert ()</h3>
352
 
<a class="indexterm" name="id3247565"></a><pre class="programlisting">void                g_hash_table_insert                 (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
 
352
<a class="indexterm" name="id3071776"></a><pre class="programlisting">void                g_hash_table_insert                 (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
353
353
                                                         <a href="glib-Basic-Types.html#gpointer">gpointer</a> key,
354
354
                                                         <a href="glib-Basic-Types.html#gpointer">gpointer</a> value);</pre>
355
355
<p>
387
387
</div>
388
388
<hr>
389
389
<div class="refsect2" lang="en">
390
 
<a name="id3247717"></a><h3>
 
390
<a name="id3071928"></a><h3>
391
391
<a name="g-hash-table-replace"></a>g_hash_table_replace ()</h3>
392
 
<a class="indexterm" name="id3247731"></a><pre class="programlisting">void                g_hash_table_replace                (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
 
392
<a class="indexterm" name="id3071942"></a><pre class="programlisting">void                g_hash_table_replace                (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
393
393
                                                         <a href="glib-Basic-Types.html#gpointer">gpointer</a> key,
394
394
                                                         <a href="glib-Basic-Types.html#gpointer">gpointer</a> value);</pre>
395
395
<p>
425
425
</div>
426
426
<hr>
427
427
<div class="refsect2" lang="en">
428
 
<a name="id3247891"></a><h3>
 
428
<a name="id3072102"></a><h3>
429
429
<a name="g-hash-table-size"></a>g_hash_table_size ()</h3>
430
 
<a class="indexterm" name="id3247904"></a><pre class="programlisting"><a href="glib-Basic-Types.html#guint">guint</a>               g_hash_table_size                   (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);</pre>
 
430
<a class="indexterm" name="id3072115"></a><pre class="programlisting"><a href="glib-Basic-Types.html#guint">guint</a>               g_hash_table_size                   (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);</pre>
431
431
<p>
432
432
Returns the number of elements contained in the <a href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.</p>
433
433
<p>
451
451
</div>
452
452
<hr>
453
453
<div class="refsect2" lang="en">
454
 
<a name="id3247988"></a><h3>
 
454
<a name="id3072199"></a><h3>
455
455
<a name="g-hash-table-lookup"></a>g_hash_table_lookup ()</h3>
456
 
<a class="indexterm" name="id3248001"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gpointer">gpointer</a>            g_hash_table_lookup                 (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
 
456
<a class="indexterm" name="id3072212"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gpointer">gpointer</a>            g_hash_table_lookup                 (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
457
457
                                                         <a href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> key);</pre>
458
458
<p>
459
459
Looks up a key in a <a href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>. Note that this function cannot
486
486
</div>
487
487
<hr>
488
488
<div class="refsect2" lang="en">
489
 
<a name="id3248133"></a><h3>
 
489
<a name="id3072344"></a><h3>
490
490
<a name="g-hash-table-lookup-extended"></a>g_hash_table_lookup_extended ()</h3>
491
 
<a class="indexterm" name="id3248146"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a>            g_hash_table_lookup_extended        (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
 
491
<a class="indexterm" name="id3072358"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a>            g_hash_table_lookup_extended        (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
492
492
                                                         <a href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> lookup_key,
493
493
                                                         <a href="glib-Basic-Types.html#gpointer">gpointer</a> *orig_key,
494
494
                                                         <a href="glib-Basic-Types.html#gpointer">gpointer</a> *value);</pre>
533
533
</div>
534
534
<hr>
535
535
<div class="refsect2" lang="en">
536
 
<a name="id3248339"></a><h3>
 
536
<a name="id3072550"></a><h3>
537
537
<a name="g-hash-table-foreach"></a>g_hash_table_foreach ()</h3>
538
 
<a class="indexterm" name="id3248352"></a><pre class="programlisting">void                g_hash_table_foreach                (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
 
538
<a class="indexterm" name="id3072563"></a><pre class="programlisting">void                g_hash_table_foreach                (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
539
539
                                                         <a href="glib-Hash-Tables.html#GHFunc">GHFunc</a> func,
540
540
                                                         <a href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);</pre>
541
541
<p>
575
575
</div>
576
576
<hr>
577
577
<div class="refsect2" lang="en">
578
 
<a name="id3248509"></a><h3>
 
578
<a name="id3072720"></a><h3>
579
579
<a name="g-hash-table-find"></a>g_hash_table_find ()</h3>
580
 
<a class="indexterm" name="id3248525"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gpointer">gpointer</a>            g_hash_table_find                   (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
 
580
<a class="indexterm" name="id3072736"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gpointer">gpointer</a>            g_hash_table_find                   (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
581
581
                                                         <a href="glib-Hash-Tables.html#GHRFunc">GHRFunc</a> predicate,
582
582
                                                         <a href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);</pre>
583
583
<p>
631
631
</div>
632
632
<hr>
633
633
<div class="refsect2" lang="en">
634
 
<a name="id3248742"></a><h3>
 
634
<a name="id3072953"></a><h3>
635
635
<a name="GHFunc"></a>GHFunc ()</h3>
636
 
<a class="indexterm" name="id3248755"></a><pre class="programlisting">void                (*GHFunc)                           (<a href="glib-Basic-Types.html#gpointer">gpointer</a> key,
 
636
<a class="indexterm" name="id3072966"></a><pre class="programlisting">void                (*GHFunc)                           (<a href="glib-Basic-Types.html#gpointer">gpointer</a> key,
637
637
                                                         <a href="glib-Basic-Types.html#gpointer">gpointer</a> value,
638
638
                                                         <a href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);</pre>
639
639
<p>
666
666
</div>
667
667
<hr>
668
668
<div class="refsect2" lang="en">
669
 
<a name="id3248886"></a><h3>
 
669
<a name="id3073097"></a><h3>
670
670
<a name="g-hash-table-remove"></a>g_hash_table_remove ()</h3>
671
 
<a class="indexterm" name="id3248899"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a>            g_hash_table_remove                 (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
 
671
<a class="indexterm" name="id3073110"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a>            g_hash_table_remove                 (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
672
672
                                                         <a href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> key);</pre>
673
673
<p>
674
674
Removes a key and its associated value from a <a href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
704
704
</div>
705
705
<hr>
706
706
<div class="refsect2" lang="en">
707
 
<a name="id3249040"></a><h3>
 
707
<a name="id3073251"></a><h3>
708
708
<a name="g-hash-table-steal"></a>g_hash_table_steal ()</h3>
709
 
<a class="indexterm" name="id3249053"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a>            g_hash_table_steal                  (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
 
709
<a class="indexterm" name="id3073264"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a>            g_hash_table_steal                  (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
710
710
                                                         <a href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> key);</pre>
711
711
<p>
712
712
Removes a key and its associated value from a <a href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> without
737
737
</div>
738
738
<hr>
739
739
<div class="refsect2" lang="en">
740
 
<a name="id3249170"></a><h3>
 
740
<a name="id3073381"></a><h3>
741
741
<a name="g-hash-table-foreach-remove"></a>g_hash_table_foreach_remove ()</h3>
742
 
<a class="indexterm" name="id3249184"></a><pre class="programlisting"><a href="glib-Basic-Types.html#guint">guint</a>               g_hash_table_foreach_remove         (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
 
742
<a class="indexterm" name="id3073395"></a><pre class="programlisting"><a href="glib-Basic-Types.html#guint">guint</a>               g_hash_table_foreach_remove         (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
743
743
                                                         <a href="glib-Hash-Tables.html#GHRFunc">GHRFunc</a> func,
744
744
                                                         <a href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);</pre>
745
745
<p>
779
779
</div>
780
780
<hr>
781
781
<div class="refsect2" lang="en">
782
 
<a name="id3249334"></a><h3>
 
782
<a name="id3073545"></a><h3>
783
783
<a name="g-hash-table-foreach-steal"></a>g_hash_table_foreach_steal ()</h3>
784
 
<a class="indexterm" name="id3249348"></a><pre class="programlisting"><a href="glib-Basic-Types.html#guint">guint</a>               g_hash_table_foreach_steal          (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
 
784
<a class="indexterm" name="id3073559"></a><pre class="programlisting"><a href="glib-Basic-Types.html#guint">guint</a>               g_hash_table_foreach_steal          (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table,
785
785
                                                         <a href="glib-Hash-Tables.html#GHRFunc">GHRFunc</a> func,
786
786
                                                         <a href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);</pre>
787
787
<p>
819
819
</div>
820
820
<hr>
821
821
<div class="refsect2" lang="en">
822
 
<a name="id3249489"></a><h3>
 
822
<a name="id3073701"></a><h3>
823
823
<a name="g-hash-table-remove-all"></a>g_hash_table_remove_all ()</h3>
824
 
<a class="indexterm" name="id3249505"></a><pre class="programlisting">void                g_hash_table_remove_all             (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);</pre>
 
824
<a class="indexterm" name="id3073716"></a><pre class="programlisting">void                g_hash_table_remove_all             (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);</pre>
825
825
<p>
826
826
Removes all keys and their associated values from a <a href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.
827
827
</p>
846
846
</div>
847
847
<hr>
848
848
<div class="refsect2" lang="en">
849
 
<a name="id3249603"></a><h3>
 
849
<a name="id3073815"></a><h3>
850
850
<a name="g-hash-table-steal-all"></a>g_hash_table_steal_all ()</h3>
851
 
<a class="indexterm" name="id3249618"></a><pre class="programlisting">void                g_hash_table_steal_all              (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);</pre>
 
851
<a class="indexterm" name="id3073830"></a><pre class="programlisting">void                g_hash_table_steal_all              (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);</pre>
852
852
<p>
853
853
Removes all keys and their associated values from a <a href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> 
854
854
without calling the key and value destroy functions.</p>
868
868
</div>
869
869
<hr>
870
870
<div class="refsect2" lang="en">
871
 
<a name="id3249693"></a><h3>
 
871
<a name="id3073904"></a><h3>
872
872
<a name="g-hash-table-get-keys"></a>g_hash_table_get_keys ()</h3>
873
 
<a class="indexterm" name="id3249708"></a><pre class="programlisting"><a href="glib-Doubly-Linked-Lists.html#GList">GList</a>*              g_hash_table_get_keys               (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);</pre>
 
873
<a class="indexterm" name="id3073920"></a><pre class="programlisting"><a href="glib-Doubly-Linked-Lists.html#GList">GList</a>*              g_hash_table_get_keys               (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);</pre>
874
874
<p>
875
875
Retrieves every key inside <em class="parameter"><code>hash_table</code></em>. The returned data is valid
876
876
until <em class="parameter"><code>hash_table</code></em> is modified.</p>
901
901
</div>
902
902
<hr>
903
903
<div class="refsect2" lang="en">
904
 
<a name="id3249817"></a><h3>
 
904
<a name="id3074028"></a><h3>
905
905
<a name="g-hash-table-get-values"></a>g_hash_table_get_values ()</h3>
906
 
<a class="indexterm" name="id3249832"></a><pre class="programlisting"><a href="glib-Doubly-Linked-Lists.html#GList">GList</a>*              g_hash_table_get_values             (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);</pre>
 
906
<a class="indexterm" name="id3074043"></a><pre class="programlisting"><a href="glib-Doubly-Linked-Lists.html#GList">GList</a>*              g_hash_table_get_values             (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);</pre>
907
907
<p>
908
908
Retrieves every value inside <em class="parameter"><code>hash_table</code></em>. The returned data is
909
909
valid until <em class="parameter"><code>hash_table</code></em> is modified.</p>
934
934
</div>
935
935
<hr>
936
936
<div class="refsect2" lang="en">
937
 
<a name="id3249941"></a><h3>
 
937
<a name="id3074152"></a><h3>
938
938
<a name="GHRFunc"></a>GHRFunc ()</h3>
939
 
<a class="indexterm" name="id3249953"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a>            (*GHRFunc)                          (<a href="glib-Basic-Types.html#gpointer">gpointer</a> key,
 
939
<a class="indexterm" name="id3074164"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a>            (*GHRFunc)                          (<a href="glib-Basic-Types.html#gpointer">gpointer</a> key,
940
940
                                                         <a href="glib-Basic-Types.html#gpointer">gpointer</a> value,
941
941
                                                         <a href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);</pre>
942
942
<p>
977
977
</div>
978
978
<hr>
979
979
<div class="refsect2" lang="en">
980
 
<a name="id3250131"></a><h3>
 
980
<a name="id3074342"></a><h3>
981
981
<a name="g-hash-table-freeze"></a>g_hash_table_freeze()</h3>
982
 
<a class="indexterm" name="id3250146"></a><pre class="programlisting">#define             g_hash_table_freeze(hash_table)</pre>
 
982
<a class="indexterm" name="id3074358"></a><pre class="programlisting">#define             g_hash_table_freeze(hash_table)</pre>
983
983
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
984
984
<h3 class="title">Warning</h3>
985
985
<p><code class="literal">g_hash_table_freeze</code> is deprecated and should not be used in newly-written code.</p>
1001
1001
</div>
1002
1002
<hr>
1003
1003
<div class="refsect2" lang="en">
1004
 
<a name="id3250202"></a><h3>
 
1004
<a name="id3074413"></a><h3>
1005
1005
<a name="g-hash-table-thaw"></a>g_hash_table_thaw()</h3>
1006
 
<a class="indexterm" name="id3250216"></a><pre class="programlisting">#define             g_hash_table_thaw(hash_table)</pre>
 
1006
<a class="indexterm" name="id3074427"></a><pre class="programlisting">#define             g_hash_table_thaw(hash_table)</pre>
1007
1007
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
1008
1008
<h3 class="title">Warning</h3>
1009
1009
<p><code class="literal">g_hash_table_thaw</code> is deprecated and should not be used in newly-written code.</p>
1025
1025
</div>
1026
1026
<hr>
1027
1027
<div class="refsect2" lang="en">
1028
 
<a name="id3250272"></a><h3>
 
1028
<a name="id3074483"></a><h3>
1029
1029
<a name="g-hash-table-destroy"></a>g_hash_table_destroy ()</h3>
1030
 
<a class="indexterm" name="id3250285"></a><pre class="programlisting">void                g_hash_table_destroy                (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);</pre>
 
1030
<a class="indexterm" name="id3074496"></a><pre class="programlisting">void                g_hash_table_destroy                (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);</pre>
1031
1031
<p>
1032
1032
Destroys all keys and values in the <a href="glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> and decrements its
1033
1033
reference count by 1. If keys and/or values are dynamically allocated,
1049
1049
</div>
1050
1050
<hr>
1051
1051
<div class="refsect2" lang="en">
1052
 
<a name="id3250374"></a><h3>
 
1052
<a name="id3074585"></a><h3>
1053
1053
<a name="g-hash-table-ref"></a>g_hash_table_ref ()</h3>
1054
 
<a class="indexterm" name="id3250389"></a><pre class="programlisting"><a href="glib-Hash-Tables.html#GHashTable">GHashTable</a>*         g_hash_table_ref                    (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);</pre>
 
1054
<a class="indexterm" name="id3074601"></a><pre class="programlisting"><a href="glib-Hash-Tables.html#GHashTable">GHashTable</a>*         g_hash_table_ref                    (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);</pre>
1055
1055
<p>
1056
1056
Atomically increments the reference count of <em class="parameter"><code>hash_table</code></em> by one.
1057
1057
This function is MT-safe and may be called from any thread.</p>
1079
1079
</div>
1080
1080
<hr>
1081
1081
<div class="refsect2" lang="en">
1082
 
<a name="id3250480"></a><h3>
 
1082
<a name="id3074691"></a><h3>
1083
1083
<a name="g-hash-table-unref"></a>g_hash_table_unref ()</h3>
1084
 
<a class="indexterm" name="id3250495"></a><pre class="programlisting">void                g_hash_table_unref                  (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);</pre>
 
1084
<a class="indexterm" name="id3074706"></a><pre class="programlisting">void                g_hash_table_unref                  (<a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> *hash_table);</pre>
1085
1085
<p>
1086
1086
Atomically decrements the reference count of <em class="parameter"><code>hash_table</code></em> by one.
1087
1087
If the reference count drops to 0, all keys and values will be
1103
1103
</div>
1104
1104
<hr>
1105
1105
<div class="refsect2" lang="en">
1106
 
<a name="id3250570"></a><h3>
 
1106
<a name="id3074781"></a><h3>
1107
1107
<a name="g-direct-equal"></a>g_direct_equal ()</h3>
1108
 
<a class="indexterm" name="id3250582"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a>            g_direct_equal                      (<a href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v1,
 
1108
<a class="indexterm" name="id3074794"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a>            g_direct_equal                      (<a href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v1,
1109
1109
                                                         <a href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v2);</pre>
1110
1110
<p>
1111
1111
Compares two <a href="glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> arguments and returns <a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if they are equal.
1137
1137
</div>
1138
1138
<hr>
1139
1139
<div class="refsect2" lang="en">
1140
 
<a name="id3250726"></a><h3>
 
1140
<a name="id3074937"></a><h3>
1141
1141
<a name="g-direct-hash"></a>g_direct_hash ()</h3>
1142
 
<a class="indexterm" name="id3250739"></a><pre class="programlisting"><a href="glib-Basic-Types.html#guint">guint</a>               g_direct_hash                       (<a href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v);</pre>
 
1142
<a class="indexterm" name="id3074950"></a><pre class="programlisting"><a href="glib-Basic-Types.html#guint">guint</a>               g_direct_hash                       (<a href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v);</pre>
1143
1143
<p>
1144
1144
Converts a gpointer to a hash value.
1145
1145
It can be passed to <a 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, 
1165
1165
</div>
1166
1166
<hr>
1167
1167
<div class="refsect2" lang="en">
1168
 
<a name="id3250833"></a><h3>
 
1168
<a name="id3075044"></a><h3>
1169
1169
<a name="g-int-equal"></a>g_int_equal ()</h3>
1170
 
<a class="indexterm" name="id3250845"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a>            g_int_equal                         (<a href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v1,
 
1170
<a class="indexterm" name="id3075056"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a>            g_int_equal                         (<a href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v1,
1171
1171
                                                         <a href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v2);</pre>
1172
1172
<p>
1173
1173
Compares the two <a href="glib-Basic-Types.html#gint"><span class="type">gint</span></a> values being pointed to and returns 
1200
1200
</div>
1201
1201
<hr>
1202
1202
<div class="refsect2" lang="en">
1203
 
<a name="id3251004"></a><h3>
 
1203
<a name="id3075215"></a><h3>
1204
1204
<a name="g-int-hash"></a>g_int_hash ()</h3>
1205
 
<a class="indexterm" name="id3251016"></a><pre class="programlisting"><a href="glib-Basic-Types.html#guint">guint</a>               g_int_hash                          (<a href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v);</pre>
 
1205
<a class="indexterm" name="id3075228"></a><pre class="programlisting"><a href="glib-Basic-Types.html#guint">guint</a>               g_int_hash                          (<a href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v);</pre>
1206
1206
<p>
1207
1207
Converts a pointer to a <a href="glib-Basic-Types.html#gint"><span class="type">gint</span></a> to a hash value.
1208
1208
It can be passed to <a 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, 
1228
1228
</div>
1229
1229
<hr>
1230
1230
<div class="refsect2" lang="en">
1231
 
<a name="id3251119"></a><h3>
 
1231
<a name="id3075331"></a><h3>
1232
1232
<a name="g-str-equal"></a>g_str_equal ()</h3>
1233
 
<a class="indexterm" name="id3251132"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a>            g_str_equal                         (<a href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v1,
 
1233
<a class="indexterm" name="id3075343"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a>            g_str_equal                         (<a href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v1,
1234
1234
                                                         <a href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v2);</pre>
1235
1235
<p>
1236
1236
Compares two strings for byte-by-byte equality and returns <a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> 
1261
1261
</div>
1262
1262
<hr>
1263
1263
<div class="refsect2" lang="en">
1264
 
<a name="id3251267"></a><h3>
 
1264
<a name="id3075478"></a><h3>
1265
1265
<a name="g-str-hash"></a>g_str_hash ()</h3>
1266
 
<a class="indexterm" name="id3251280"></a><pre class="programlisting"><a href="glib-Basic-Types.html#guint">guint</a>               g_str_hash                          (<a href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v);</pre>
 
1266
<a class="indexterm" name="id3075491"></a><pre class="programlisting"><a href="glib-Basic-Types.html#guint">guint</a>               g_str_hash                          (<a href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> v);</pre>
1267
1267
<p>
1268
1268
Converts a string to a hash value.
1269
1269
It can be passed to <a 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,