<refentry id="glib-Hash-Tables">
<refmeta>
<refentrytitle role="top_of_page" id="glib-Hash-Tables.top_of_page">Hash Tables</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GLIB Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>Hash Tables</refname>
<refpurpose>associations between keys and values so that given a key the value
can be found quickly</refpurpose>
</refnamediv>

<refsynopsisdiv id="glib-Hash-Tables.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>

#include &lt;glib.h&gt;

                    <link linkend="GHashTable">GHashTable</link>;
<link linkend="GHashTable">GHashTable</link>*         <link linkend="g-hash-table-new">g_hash_table_new</link>                    (<link linkend="GHashFunc">GHashFunc</link> hash_func,
                                                         <link linkend="GEqualFunc">GEqualFunc</link> key_equal_func);
<link linkend="GHashTable">GHashTable</link>*         <link linkend="g-hash-table-new-full">g_hash_table_new_full</link>               (<link linkend="GHashFunc">GHashFunc</link> hash_func,
                                                         <link linkend="GEqualFunc">GEqualFunc</link> key_equal_func,
                                                         <link linkend="GDestroyNotify">GDestroyNotify</link> key_destroy_func,
                                                         <link linkend="GDestroyNotify">GDestroyNotify</link> value_destroy_func);
<link linkend="guint">guint</link>               (<link linkend="GHashFunc">*GHashFunc</link>)                        (<link linkend="gconstpointer">gconstpointer</link> key);
<link linkend="gboolean">gboolean</link>            (<link linkend="GEqualFunc">*GEqualFunc</link>)                       (<link linkend="gconstpointer">gconstpointer</link> a,
                                                         <link linkend="gconstpointer">gconstpointer</link> b);
<link linkend="void">void</link>                <link linkend="g-hash-table-insert">g_hash_table_insert</link>                 (<link linkend="GHashTable">GHashTable</link> *hash_table,
                                                         <link linkend="gpointer">gpointer</link> key,
                                                         <link linkend="gpointer">gpointer</link> value);
<link linkend="void">void</link>                <link linkend="g-hash-table-replace">g_hash_table_replace</link>                (<link linkend="GHashTable">GHashTable</link> *hash_table,
                                                         <link linkend="gpointer">gpointer</link> key,
                                                         <link linkend="gpointer">gpointer</link> value);
<link linkend="guint">guint</link>               <link linkend="g-hash-table-size">g_hash_table_size</link>                   (<link linkend="GHashTable">GHashTable</link> *hash_table);
<link linkend="gpointer">gpointer</link>            <link linkend="g-hash-table-lookup">g_hash_table_lookup</link>                 (<link linkend="GHashTable">GHashTable</link> *hash_table,
                                                         <link linkend="gconstpointer">gconstpointer</link> key);
<link linkend="gboolean">gboolean</link>            <link linkend="g-hash-table-lookup-extended">g_hash_table_lookup_extended</link>        (<link linkend="GHashTable">GHashTable</link> *hash_table,
                                                         <link linkend="gconstpointer">gconstpointer</link> lookup_key,
                                                         <link linkend="gpointer">gpointer</link> *orig_key,
                                                         <link linkend="gpointer">gpointer</link> *value);
<link linkend="void">void</link>                <link linkend="g-hash-table-foreach">g_hash_table_foreach</link>                (<link linkend="GHashTable">GHashTable</link> *hash_table,
                                                         <link linkend="GHFunc">GHFunc</link> func,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="gpointer">gpointer</link>            <link linkend="g-hash-table-find">g_hash_table_find</link>                   (<link linkend="GHashTable">GHashTable</link> *hash_table,
                                                         <link linkend="GHRFunc">GHRFunc</link> predicate,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="void">void</link>                (<link linkend="GHFunc">*GHFunc</link>)                           (<link linkend="gpointer">gpointer</link> key,
                                                         <link linkend="gpointer">gpointer</link> value,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="gboolean">gboolean</link>            <link linkend="g-hash-table-remove">g_hash_table_remove</link>                 (<link linkend="GHashTable">GHashTable</link> *hash_table,
                                                         <link linkend="gconstpointer">gconstpointer</link> key);
<link linkend="gboolean">gboolean</link>            <link linkend="g-hash-table-steal">g_hash_table_steal</link>                  (<link linkend="GHashTable">GHashTable</link> *hash_table,
                                                         <link linkend="gconstpointer">gconstpointer</link> key);
<link linkend="guint">guint</link>               <link linkend="g-hash-table-foreach-remove">g_hash_table_foreach_remove</link>         (<link linkend="GHashTable">GHashTable</link> *hash_table,
                                                         <link linkend="GHRFunc">GHRFunc</link> func,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="guint">guint</link>               <link linkend="g-hash-table-foreach-steal">g_hash_table_foreach_steal</link>          (<link linkend="GHashTable">GHashTable</link> *hash_table,
                                                         <link linkend="GHRFunc">GHRFunc</link> func,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="void">void</link>                <link linkend="g-hash-table-remove-all">g_hash_table_remove_all</link>             (<link linkend="GHashTable">GHashTable</link> *hash_table);
<link linkend="void">void</link>                <link linkend="g-hash-table-steal-all">g_hash_table_steal_all</link>              (<link linkend="GHashTable">GHashTable</link> *hash_table);
<link linkend="GList">GList</link> *             <link linkend="g-hash-table-get-keys">g_hash_table_get_keys</link>               (<link linkend="GHashTable">GHashTable</link> *hash_table);
<link linkend="GList">GList</link> *             <link linkend="g-hash-table-get-values">g_hash_table_get_values</link>             (<link linkend="GHashTable">GHashTable</link> *hash_table);
<link linkend="gboolean">gboolean</link>            (<link linkend="GHRFunc">*GHRFunc</link>)                          (<link linkend="gpointer">gpointer</link> key,
                                                         <link linkend="gpointer">gpointer</link> value,
                                                         <link linkend="gpointer">gpointer</link> user_data);
#define             <link linkend="g-hash-table-freeze">g_hash_table_freeze</link>                 (hash_table)
#define             <link linkend="g-hash-table-thaw">g_hash_table_thaw</link>                   (hash_table)
<link linkend="void">void</link>                <link linkend="g-hash-table-destroy">g_hash_table_destroy</link>                (<link linkend="GHashTable">GHashTable</link> *hash_table);
<link linkend="GHashTable">GHashTable</link>*         <link linkend="g-hash-table-ref">g_hash_table_ref</link>                    (<link linkend="GHashTable">GHashTable</link> *hash_table);
<link linkend="void">void</link>                <link linkend="g-hash-table-unref">g_hash_table_unref</link>                  (<link linkend="GHashTable">GHashTable</link> *hash_table);
                    <link linkend="GHashTableIter">GHashTableIter</link>;
<link linkend="void">void</link>                <link linkend="g-hash-table-iter-init">g_hash_table_iter_init</link>              (<link linkend="GHashTableIter">GHashTableIter</link> *iter,
                                                         <link linkend="GHashTable">GHashTable</link> *hash_table);
<link linkend="gboolean">gboolean</link>            <link linkend="g-hash-table-iter-next">g_hash_table_iter_next</link>              (<link linkend="GHashTableIter">GHashTableIter</link> *iter,
                                                         <link linkend="gpointer">gpointer</link> *key,
                                                         <link linkend="gpointer">gpointer</link> *value);
<link linkend="GHashTable">GHashTable</link>*         <link linkend="g-hash-table-iter-get-hash-table">g_hash_table_iter_get_hash_table</link>    (<link linkend="GHashTableIter">GHashTableIter</link> *iter);
<link linkend="void">void</link>                <link linkend="g-hash-table-iter-remove">g_hash_table_iter_remove</link>            (<link linkend="GHashTableIter">GHashTableIter</link> *iter);
<link linkend="void">void</link>                <link linkend="g-hash-table-iter-steal">g_hash_table_iter_steal</link>             (<link linkend="GHashTableIter">GHashTableIter</link> *iter);

<link linkend="gboolean">gboolean</link>            <link linkend="g-direct-equal">g_direct_equal</link>                      (<link linkend="gconstpointer">gconstpointer</link> v1,
                                                         <link linkend="gconstpointer">gconstpointer</link> v2);
<link linkend="guint">guint</link>               <link linkend="g-direct-hash">g_direct_hash</link>                       (<link linkend="gconstpointer">gconstpointer</link> v);
<link linkend="gboolean">gboolean</link>            <link linkend="g-int-equal">g_int_equal</link>                         (<link linkend="gconstpointer">gconstpointer</link> v1,
                                                         <link linkend="gconstpointer">gconstpointer</link> v2);
<link linkend="guint">guint</link>               <link linkend="g-int-hash">g_int_hash</link>                          (<link linkend="gconstpointer">gconstpointer</link> v);
<link linkend="gboolean">gboolean</link>            <link linkend="g-int64-equal">g_int64_equal</link>                       (<link linkend="gconstpointer">gconstpointer</link> v1,
                                                         <link linkend="gconstpointer">gconstpointer</link> v2);
<link linkend="guint">guint</link>               <link linkend="g-int64-hash">g_int64_hash</link>                        (<link linkend="gconstpointer">gconstpointer</link> v);
<link linkend="gboolean">gboolean</link>            <link linkend="g-double-equal">g_double_equal</link>                      (<link linkend="gconstpointer">gconstpointer</link> v1,
                                                         <link linkend="gconstpointer">gconstpointer</link> v2);
<link linkend="guint">guint</link>               <link linkend="g-double-hash">g_double_hash</link>                       (<link linkend="gconstpointer">gconstpointer</link> v);
<link linkend="gboolean">gboolean</link>            <link linkend="g-str-equal">g_str_equal</link>                         (<link linkend="gconstpointer">gconstpointer</link> v1,
                                                         <link linkend="gconstpointer">gconstpointer</link> v2);
<link linkend="guint">guint</link>               <link linkend="g-str-hash">g_str_hash</link>                          (<link linkend="gconstpointer">gconstpointer</link> v);
</synopsis>
</refsynopsisdiv>









<refsect1 id="glib-Hash-Tables.description" role="desc">
<title role="desc.title">Description</title>
<para>
A <link linkend="GHashTable"><type>GHashTable</type></link> provides associations between keys and values which
is optimized so that given a key, the associated value can be found
very quickly.
</para>
<para>
Note that neither keys nor values are copied when inserted into the
<link linkend="GHashTable"><type>GHashTable</type></link>, so they must exist for the lifetime of the <link linkend="GHashTable"><type>GHashTable</type></link>.
This means that the use of static strings is OK, but temporary
strings (i.e. those created in buffers and those returned by GTK+ widgets)
should be copied with <link linkend="g-strdup"><function>g_strdup()</function></link> before being inserted.
</para>
<para>
If keys or values are dynamically allocated, you must be careful to ensure
that they are freed when they are removed from the <link linkend="GHashTable"><type>GHashTable</type></link>, and also
when they are overwritten by new insertions into the <link linkend="GHashTable"><type>GHashTable</type></link>.
It is also not advisable to mix static strings and dynamically-allocated
strings in a <link linkend="GHashTable"><type>GHashTable</type></link>, because it then becomes difficult to determine
whether the string should be freed.
</para>
<para>
To create a <link linkend="GHashTable"><type>GHashTable</type></link>, use <link linkend="g-hash-table-new"><function>g_hash_table_new()</function></link>.
</para>
<para>
To insert a key and value into a <link linkend="GHashTable"><type>GHashTable</type></link>, use <link linkend="g-hash-table-insert"><function>g_hash_table_insert()</function></link>.
</para>
<para>
To lookup a value corresponding to a given key, use <link linkend="g-hash-table-lookup"><function>g_hash_table_lookup()</function></link>
and <link linkend="g-hash-table-lookup-extended"><function>g_hash_table_lookup_extended()</function></link>.
</para>
<para>
To remove a key and value, use <link linkend="g-hash-table-remove"><function>g_hash_table_remove()</function></link>.
</para>
<para>
To call a function for each key and value pair use <link linkend="g-hash-table-foreach"><function>g_hash_table_foreach()</function></link>
or use a iterator to iterate over the key/value pairs in the hash table, see
<link linkend="GHashTableIter"><type>GHashTableIter</type></link>.
</para>
<para>
To destroy a <link linkend="GHashTable"><type>GHashTable</type></link> use <link linkend="g-hash-table-destroy"><function>g_hash_table_destroy()</function></link>.
</para>
</refsect1>

<refsect1 id="glib-Hash-Tables.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GHashTable" role="struct">
<title>GHashTable</title>
<indexterm zone="GHashTable"><primary sortas="HashTable">GHashTable</primary></indexterm><programlisting>typedef struct _GHashTable GHashTable;</programlisting>
<para>
The <structname>GHashTable</structname> struct is an opaque data structure to represent a
<link linkend="glib-Hash-Tables">Hash Table</link>.
It should only be accessed via the following functions.
</para></refsect2>
<refsect2 id="g-hash-table-new" role="function">
<title>g_hash_table_new ()</title>
<indexterm zone="g-hash-table-new"><primary sortas="hash_table_new">g_hash_table_new</primary></indexterm><programlisting><link linkend="GHashTable">GHashTable</link>*         g_hash_table_new                    (<link linkend="GHashFunc">GHashFunc</link> hash_func,
                                                         <link linkend="GEqualFunc">GEqualFunc</link> key_equal_func);</programlisting>
<para>
Creates a new <link linkend="GHashTable"><type>GHashTable</type></link> with a reference count of 1.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>hash_func</parameter>&#160;:</term>
<listitem><simpara> a function to create a hash value from a key.
  Hash values are used to determine where keys are stored within the
  <link linkend="GHashTable"><type>GHashTable</type></link> data structure. The <link linkend="g-direct-hash"><function>g_direct_hash()</function></link>, <link linkend="g-int-hash"><function>g_int_hash()</function></link>,
  <link linkend="g-int64-hash"><function>g_int64_hash()</function></link>, <link linkend="g-double-hash"><function>g_double_hash()</function></link> and <link linkend="g-str-hash"><function>g_str_hash()</function></link> functions are provided
  for some common types of keys.
  If hash_func is <link linkend="NULL--CAPS"><literal>NULL</literal></link>, <link linkend="g-direct-hash"><function>g_direct_hash()</function></link> is used.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>key_equal_func</parameter>&#160;:</term>
<listitem><simpara> a function to check two keys for equality.  This is
  used when looking up keys in the <link linkend="GHashTable"><type>GHashTable</type></link>.  The <link linkend="g-direct-equal"><function>g_direct_equal()</function></link>,
  <link linkend="g-int-equal"><function>g_int_equal()</function></link>, <link linkend="g-int64-equal"><function>g_int64_equal()</function></link>, <link linkend="g-double-equal"><function>g_double_equal()</function></link> and <link linkend="g-str-equal"><function>g_str_equal()</function></link>
  functions are provided for the most common types of keys.
  If <parameter>key_equal_func</parameter> is <link linkend="NULL--CAPS"><literal>NULL</literal></link>, keys are compared directly in a similar
  fashion to <link linkend="g-direct-equal"><function>g_direct_equal()</function></link>, but without the overhead of a function call.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="GHashTable"><type>GHashTable</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-hash-table-new-full" role="function">
<title>g_hash_table_new_full ()</title>
<indexterm zone="g-hash-table-new-full"><primary sortas="hash_table_new_full">g_hash_table_new_full</primary></indexterm><programlisting><link linkend="GHashTable">GHashTable</link>*         g_hash_table_new_full               (<link linkend="GHashFunc">GHashFunc</link> hash_func,
                                                         <link linkend="GEqualFunc">GEqualFunc</link> key_equal_func,
                                                         <link linkend="GDestroyNotify">GDestroyNotify</link> key_destroy_func,
                                                         <link linkend="GDestroyNotify">GDestroyNotify</link> value_destroy_func);</programlisting>
<para>
Creates a new <link linkend="GHashTable"><type>GHashTable</type></link> like <link linkend="g-hash-table-new"><function>g_hash_table_new()</function></link> with a reference count
of 1 and allows to specify functions to free the memory allocated for the
key and value that get called when removing the entry from the <link linkend="GHashTable"><type>GHashTable</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>hash_func</parameter>&#160;:</term>
<listitem><simpara> a function to create a hash value from a key.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>key_equal_func</parameter>&#160;:</term>
<listitem><simpara> a function to check two keys for equality.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>key_destroy_func</parameter>&#160;:</term>
<listitem><simpara> a function to free the memory allocated for the key
  used when removing the entry from the <link linkend="GHashTable"><type>GHashTable</type></link> or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if you
  don't want to supply such a function.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value_destroy_func</parameter>&#160;:</term>
<listitem><simpara> a function to free the memory allocated for the
  value used when removing the entry from the <link linkend="GHashTable"><type>GHashTable</type></link> or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if
  you don't want to supply such a function.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="GHashTable"><type>GHashTable</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GHashFunc" role="function">
<title>GHashFunc ()</title>
<indexterm zone="GHashFunc"><primary sortas="HashFunc">GHashFunc</primary></indexterm><programlisting><link linkend="guint">guint</link>               (*GHashFunc)                        (<link linkend="gconstpointer">gconstpointer</link> key);</programlisting>
<para>
Specifies the type of the hash function which is passed to
<link linkend="g-hash-table-new"><function>g_hash_table_new()</function></link> when a <link linkend="GHashTable"><type>GHashTable</type></link> is created.
</para>
<para>
The function is passed a key and should return a <link linkend="guint"><type>guint</type></link> hash value.
The functions <link linkend="g-direct-hash"><function>g_direct_hash()</function></link>, <link linkend="g-int-hash"><function>g_int_hash()</function></link> and <link linkend="g-str-hash"><function>g_str_hash()</function></link> provide
hash functions which can be used when the key is a <link linkend="gpointer"><type>gpointer</type></link>, <link linkend="gint"><type>gint</type></link>, and
<link linkend="gchar"><type>gchar</type></link>* respectively.
</para>
<para>
<!-- FIXME: Need more here. -->
The hash values should be evenly distributed over a fairly large range?
The modulus is taken with the hash table size (a prime number)
to find the 'bucket' to place each key into.
The function should also be very fast, since it is called for each key
lookup.
</para><variablelist role="params">
<varlistentry><term><parameter>key</parameter>&#160;:</term>
<listitem><simpara>a key.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>the hash value corresponding to the key.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GEqualFunc" role="function">
<title>GEqualFunc ()</title>
<indexterm zone="GEqualFunc"><primary sortas="EqualFunc">GEqualFunc</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            (*GEqualFunc)                       (<link linkend="gconstpointer">gconstpointer</link> a,
                                                         <link linkend="gconstpointer">gconstpointer</link> b);</programlisting>
<para>
Specifies the type of a function used to test two values for
equality. The function should return <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if both values are equal and
<link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.
</para><variablelist role="params">
<varlistentry><term><parameter>a</parameter>&#160;:</term>
<listitem><simpara>a value.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>b</parameter>&#160;:</term>
<listitem><simpara>a value to compare with.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>%TRUE if <parameter>a</parameter> = <parameter>b</parameter>; <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-hash-table-insert" role="function">
<title>g_hash_table_insert ()</title>
<indexterm zone="g-hash-table-insert"><primary sortas="hash_table_insert">g_hash_table_insert</primary></indexterm><programlisting><link linkend="void">void</link>                g_hash_table_insert                 (<link linkend="GHashTable">GHashTable</link> *hash_table,
                                                         <link linkend="gpointer">gpointer</link> key,
                                                         <link linkend="gpointer">gpointer</link> value);</programlisting>
<para>
Inserts a new key and value into a <link linkend="GHashTable"><type>GHashTable</type></link>.
</para>
<para>
If the key already exists in the <link linkend="GHashTable"><type>GHashTable</type></link> its current value is replaced
with the new value. If you supplied a <parameter>value_destroy_func</parameter> when creating the
<link linkend="GHashTable"><type>GHashTable</type></link>, the old value is freed using that function. If you supplied
a <parameter>key_destroy_func</parameter> when creating the <link linkend="GHashTable"><type>GHashTable</type></link>, the passed key is freed
using that function.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>hash_table</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GHashTable"><type>GHashTable</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>key</parameter>&#160;:</term>
<listitem><simpara> a key to insert.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&#160;:</term>
<listitem><simpara> the value to associate with the key.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-hash-table-replace" role="function">
<title>g_hash_table_replace ()</title>
<indexterm zone="g-hash-table-replace"><primary sortas="hash_table_replace">g_hash_table_replace</primary></indexterm><programlisting><link linkend="void">void</link>                g_hash_table_replace                (<link linkend="GHashTable">GHashTable</link> *hash_table,
                                                         <link linkend="gpointer">gpointer</link> key,
                                                         <link linkend="gpointer">gpointer</link> value);</programlisting>
<para>
Inserts a new key and value into a <link linkend="GHashTable"><type>GHashTable</type></link> similar to
<link linkend="g-hash-table-insert"><function>g_hash_table_insert()</function></link>. The difference is that if the key already exists
in the <link linkend="GHashTable"><type>GHashTable</type></link>, it gets replaced by the new key. If you supplied a
<parameter>value_destroy_func</parameter> when creating the <link linkend="GHashTable"><type>GHashTable</type></link>, the old value is freed
using that function. If you supplied a <parameter>key_destroy_func</parameter> when creating the
<link linkend="GHashTable"><type>GHashTable</type></link>, the old key is freed using that function.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>hash_table</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GHashTable"><type>GHashTable</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>key</parameter>&#160;:</term>
<listitem><simpara> a key to insert.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&#160;:</term>
<listitem><simpara> the value to associate with the key.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-hash-table-size" role="function">
<title>g_hash_table_size ()</title>
<indexterm zone="g-hash-table-size"><primary sortas="hash_table_size">g_hash_table_size</primary></indexterm><programlisting><link linkend="guint">guint</link>               g_hash_table_size                   (<link linkend="GHashTable">GHashTable</link> *hash_table);</programlisting>
<para>
Returns the number of elements contained in the <link linkend="GHashTable"><type>GHashTable</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>hash_table</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GHashTable"><type>GHashTable</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the number of key/value pairs in the <link linkend="GHashTable"><type>GHashTable</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-hash-table-lookup" role="function">
<title>g_hash_table_lookup ()</title>
<indexterm zone="g-hash-table-lookup"><primary sortas="hash_table_lookup">g_hash_table_lookup</primary></indexterm><programlisting><link linkend="gpointer">gpointer</link>            g_hash_table_lookup                 (<link linkend="GHashTable">GHashTable</link> *hash_table,
                                                         <link linkend="gconstpointer">gconstpointer</link> key);</programlisting>
<para>
Looks up a key in a <link linkend="GHashTable"><type>GHashTable</type></link>. Note that this function cannot
distinguish between a key that is not present and one which is present
and has the value <link linkend="NULL--CAPS"><literal>NULL</literal></link>. If you need this distinction, use
<link linkend="g-hash-table-lookup-extended"><function>g_hash_table_lookup_extended()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>hash_table</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GHashTable"><type>GHashTable</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>key</parameter>&#160;:</term>
<listitem><simpara> the key to look up.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the associated value, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if the key is not found.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-hash-table-lookup-extended" role="function">
<title>g_hash_table_lookup_extended ()</title>
<indexterm zone="g-hash-table-lookup-extended"><primary sortas="hash_table_lookup_extended">g_hash_table_lookup_extended</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_hash_table_lookup_extended        (<link linkend="GHashTable">GHashTable</link> *hash_table,
                                                         <link linkend="gconstpointer">gconstpointer</link> lookup_key,
                                                         <link linkend="gpointer">gpointer</link> *orig_key,
                                                         <link linkend="gpointer">gpointer</link> *value);</programlisting>
<para>
Looks up a key in the <link linkend="GHashTable"><type>GHashTable</type></link>, returning the original key and the
associated value and a <link linkend="gboolean"><type>gboolean</type></link> which is <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the key was found. This
is useful if you need to free the memory allocated for the original key,
for example before calling <link linkend="g-hash-table-remove"><function>g_hash_table_remove()</function></link>.
</para>
<para>
You can actually pass <link linkend="NULL--CAPS"><literal>NULL</literal></link> for <parameter>lookup_key</parameter> to test
whether the <link linkend="NULL--CAPS"><literal>NULL</literal></link> key exists.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>hash_table</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GHashTable"><type>GHashTable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>lookup_key</parameter>&#160;:</term>
<listitem><simpara> the key to look up
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>orig_key</parameter>&#160;:</term>
<listitem><simpara> return location for the original key, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&#160;:</term>
<listitem><simpara> return location for the value associated with the key, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the key was found in the <link linkend="GHashTable"><type>GHashTable</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-hash-table-foreach" role="function">
<title>g_hash_table_foreach ()</title>
<indexterm zone="g-hash-table-foreach"><primary sortas="hash_table_foreach">g_hash_table_foreach</primary></indexterm><programlisting><link linkend="void">void</link>                g_hash_table_foreach                (<link linkend="GHashTable">GHashTable</link> *hash_table,
                                                         <link linkend="GHFunc">GHFunc</link> func,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Calls the given function for each of the key/value pairs in the
<link linkend="GHashTable"><type>GHashTable</type></link>.  The function is passed the key and value of each
pair, and the given <parameter>user_data</parameter> parameter.  The hash table may not
be modified while iterating over it (you can't add/remove
items). To remove all items matching a predicate, use
<link linkend="g-hash-table-foreach-remove"><function>g_hash_table_foreach_remove()</function></link>.
</para>
<para>
See <link linkend="g-hash-table-find"><function>g_hash_table_find()</function></link> for performance caveats for linear
order searches in contrast to <link linkend="g-hash-table-lookup"><function>g_hash_table_lookup()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>hash_table</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GHashTable"><type>GHashTable</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>func</parameter>&#160;:</term>
<listitem><simpara> the function to call for each key/value pair.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> user data to pass to the function.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-hash-table-find" role="function" condition="since:2.4">
<title>g_hash_table_find ()</title>
<indexterm zone="g-hash-table-find" role="2.4"><primary sortas="hash_table_find">g_hash_table_find</primary></indexterm><programlisting><link linkend="gpointer">gpointer</link>            g_hash_table_find                   (<link linkend="GHashTable">GHashTable</link> *hash_table,
                                                         <link linkend="GHRFunc">GHRFunc</link> predicate,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Calls the given function for key/value pairs in the <link linkend="GHashTable"><type>GHashTable</type></link> until
<parameter>predicate</parameter> returns <link linkend="TRUE--CAPS"><literal>TRUE</literal></link>.  The function is passed the key and value of
each pair, and the given <parameter>user_data</parameter> parameter. The hash table may not
be modified while iterating over it (you can't add/remove items).
</para>
<para>
Note, that hash tables are really only optimized for forward lookups,
i.e. <link linkend="g-hash-table-lookup"><function>g_hash_table_lookup()</function></link>.
So code that frequently issues <link linkend="g-hash-table-find"><function>g_hash_table_find()</function></link> or
<link linkend="g-hash-table-foreach"><function>g_hash_table_foreach()</function></link> (e.g. in the order of once per every entry in a
hash table) should probably be reworked to use additional or different
data structures for reverse lookups (keep in mind that an O(n) find/foreach
operation issued for all n values in a hash table ends up needing O(n*n)
operations).</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>hash_table</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GHashTable"><type>GHashTable</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>predicate</parameter>&#160;:</term>
<listitem><simpara>  function to test the key/value pairs for a certain property.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>  user data to pass to the function.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> The value of the first key/value pair is returned, for which
func evaluates to <link linkend="TRUE--CAPS"><literal>TRUE</literal></link>. If no pair with the requested property is found,
<link linkend="NULL--CAPS"><literal>NULL</literal></link> is returned.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.4</para></refsect2>
<refsect2 id="GHFunc" role="function">
<title>GHFunc ()</title>
<indexterm zone="GHFunc"><primary sortas="HFunc">GHFunc</primary></indexterm><programlisting><link linkend="void">void</link>                (*GHFunc)                           (<link linkend="gpointer">gpointer</link> key,
                                                         <link linkend="gpointer">gpointer</link> value,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Specifies the type of the function passed to <link linkend="g-hash-table-foreach"><function>g_hash_table_foreach()</function></link>.
It is called with each key/value pair, together with the <parameter>user_data</parameter> parameter
which is passed to <link linkend="g-hash-table-foreach"><function>g_hash_table_foreach()</function></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>key</parameter>&#160;:</term>
<listitem><simpara>a key.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&#160;:</term>
<listitem><simpara>the value corresponding to the key.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data passed to <link linkend="g-hash-table-foreach"><function>g_hash_table_foreach()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-hash-table-remove" role="function">
<title>g_hash_table_remove ()</title>
<indexterm zone="g-hash-table-remove"><primary sortas="hash_table_remove">g_hash_table_remove</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_hash_table_remove                 (<link linkend="GHashTable">GHashTable</link> *hash_table,
                                                         <link linkend="gconstpointer">gconstpointer</link> key);</programlisting>
<para>
Removes a key and its associated value from a <link linkend="GHashTable"><type>GHashTable</type></link>.
</para>
<para>
If the <link linkend="GHashTable"><type>GHashTable</type></link> was created using <link linkend="g-hash-table-new-full"><function>g_hash_table_new_full()</function></link>, the
key and value are freed using the supplied destroy functions, otherwise
you have to make sure that any dynamically allocated values are freed
yourself.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>hash_table</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GHashTable"><type>GHashTable</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>key</parameter>&#160;:</term>
<listitem><simpara> the key to remove.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the key was found and removed from the <link linkend="GHashTable"><type>GHashTable</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-hash-table-steal" role="function">
<title>g_hash_table_steal ()</title>
<indexterm zone="g-hash-table-steal"><primary sortas="hash_table_steal">g_hash_table_steal</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_hash_table_steal                  (<link linkend="GHashTable">GHashTable</link> *hash_table,
                                                         <link linkend="gconstpointer">gconstpointer</link> key);</programlisting>
<para>
Removes a key and its associated value from a <link linkend="GHashTable"><type>GHashTable</type></link> without
calling the key and value destroy functions.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>hash_table</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GHashTable"><type>GHashTable</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>key</parameter>&#160;:</term>
<listitem><simpara> the key to remove.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the key was found and removed from the <link linkend="GHashTable"><type>GHashTable</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-hash-table-foreach-remove" role="function">
<title>g_hash_table_foreach_remove ()</title>
<indexterm zone="g-hash-table-foreach-remove"><primary sortas="hash_table_foreach_remove">g_hash_table_foreach_remove</primary></indexterm><programlisting><link linkend="guint">guint</link>               g_hash_table_foreach_remove         (<link linkend="GHashTable">GHashTable</link> *hash_table,
                                                         <link linkend="GHRFunc">GHRFunc</link> func,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Calls the given function for each key/value pair in the <link linkend="GHashTable"><type>GHashTable</type></link>.
If the function returns <link linkend="TRUE--CAPS"><literal>TRUE</literal></link>, then the key/value pair is removed from the
<link linkend="GHashTable"><type>GHashTable</type></link>. If you supplied key or value destroy functions when creating
the <link linkend="GHashTable"><type>GHashTable</type></link>, they are used to free the memory allocated for the removed
keys and values.
</para>
<para>
See <link linkend="GHashTableIter"><type>GHashTableIter</type></link> for an alternative way to loop over the 
key/value pairs in the hash table.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>hash_table</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GHashTable"><type>GHashTable</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>func</parameter>&#160;:</term>
<listitem><simpara> the function to call for each key/value pair.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> user data to pass to the function.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the number of key/value pairs removed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-hash-table-foreach-steal" role="function">
<title>g_hash_table_foreach_steal ()</title>
<indexterm zone="g-hash-table-foreach-steal"><primary sortas="hash_table_foreach_steal">g_hash_table_foreach_steal</primary></indexterm><programlisting><link linkend="guint">guint</link>               g_hash_table_foreach_steal          (<link linkend="GHashTable">GHashTable</link> *hash_table,
                                                         <link linkend="GHRFunc">GHRFunc</link> func,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Calls the given function for each key/value pair in the <link linkend="GHashTable"><type>GHashTable</type></link>.
If the function returns <link linkend="TRUE--CAPS"><literal>TRUE</literal></link>, then the key/value pair is removed from the
<link linkend="GHashTable"><type>GHashTable</type></link>, but no key or value destroy functions are called.
</para>
<para>
See <link linkend="GHashTableIter"><type>GHashTableIter</type></link> for an alternative way to loop over the 
key/value pairs in the hash table.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>hash_table</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GHashTable"><type>GHashTable</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>func</parameter>&#160;:</term>
<listitem><simpara> the function to call for each key/value pair.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> user data to pass to the function.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the number of key/value pairs removed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-hash-table-remove-all" role="function" condition="since:2.12">
<title>g_hash_table_remove_all ()</title>
<indexterm zone="g-hash-table-remove-all" role="2.12"><primary sortas="hash_table_remove_all">g_hash_table_remove_all</primary></indexterm><programlisting><link linkend="void">void</link>                g_hash_table_remove_all             (<link linkend="GHashTable">GHashTable</link> *hash_table);</programlisting>
<para>
Removes all keys and their associated values from a <link linkend="GHashTable"><type>GHashTable</type></link>.
</para>
<para>
If the <link linkend="GHashTable"><type>GHashTable</type></link> was created using <link linkend="g-hash-table-new-full"><function>g_hash_table_new_full()</function></link>, the keys
and values are freed using the supplied destroy functions, otherwise you
have to make sure that any dynamically allocated values are freed
yourself.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>hash_table</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GHashTable"><type>GHashTable</type></link>
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.12</para></refsect2>
<refsect2 id="g-hash-table-steal-all" role="function" condition="since:2.12">
<title>g_hash_table_steal_all ()</title>
<indexterm zone="g-hash-table-steal-all" role="2.12"><primary sortas="hash_table_steal_all">g_hash_table_steal_all</primary></indexterm><programlisting><link linkend="void">void</link>                g_hash_table_steal_all              (<link linkend="GHashTable">GHashTable</link> *hash_table);</programlisting>
<para>
Removes all keys and their associated values from a <link linkend="GHashTable"><type>GHashTable</type></link>
without calling the key and value destroy functions.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>hash_table</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GHashTable"><type>GHashTable</type></link>.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.12</para></refsect2>
<refsect2 id="g-hash-table-get-keys" role="function" condition="since:2.14">
<title>g_hash_table_get_keys ()</title>
<indexterm zone="g-hash-table-get-keys" role="2.14"><primary sortas="hash_table_get_keys">g_hash_table_get_keys</primary></indexterm><programlisting><link linkend="GList">GList</link> *             g_hash_table_get_keys               (<link linkend="GHashTable">GHashTable</link> *hash_table);</programlisting>
<para>
Retrieves every key inside <parameter>hash_table</parameter>. The returned data is valid
until <parameter>hash_table</parameter> is modified.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>hash_table</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GHashTable"><type>GHashTable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GList"><type>GList</type></link> containing all the keys inside the hash
  table. The content of the list is owned by the hash table and
  should not be modified or freed. Use <link linkend="g-list-free"><function>g_list_free()</function></link> when done
  using the list.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.14</para></refsect2>
<refsect2 id="g-hash-table-get-values" role="function" condition="since:2.14">
<title>g_hash_table_get_values ()</title>
<indexterm zone="g-hash-table-get-values" role="2.14"><primary sortas="hash_table_get_values">g_hash_table_get_values</primary></indexterm><programlisting><link linkend="GList">GList</link> *             g_hash_table_get_values             (<link linkend="GHashTable">GHashTable</link> *hash_table);</programlisting>
<para>
Retrieves every value inside <parameter>hash_table</parameter>. The returned data is
valid until <parameter>hash_table</parameter> is modified.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>hash_table</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GHashTable"><type>GHashTable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GList"><type>GList</type></link> containing all the values inside the hash
  table. The content of the list is owned by the hash table and
  should not be modified or freed. Use <link linkend="g-list-free"><function>g_list_free()</function></link> when done
  using the list.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.14</para></refsect2>
<refsect2 id="GHRFunc" role="function">
<title>GHRFunc ()</title>
<indexterm zone="GHRFunc"><primary sortas="HRFunc">GHRFunc</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            (*GHRFunc)                          (<link linkend="gpointer">gpointer</link> key,
                                                         <link linkend="gpointer">gpointer</link> value,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Specifies the type of the function passed to <link linkend="g-hash-table-foreach-remove"><function>g_hash_table_foreach_remove()</function></link>.
It is called with each key/value pair, together with the <parameter>user_data</parameter> parameter
passed to <link linkend="g-hash-table-foreach-remove"><function>g_hash_table_foreach_remove()</function></link>.
It should return <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the key/value pair should be removed from the
<link linkend="GHashTable"><type>GHashTable</type></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>key</parameter>&#160;:</term>
<listitem><simpara>a key.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&#160;:</term>
<listitem><simpara>the value associated with the key.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data passed to <link linkend="g-hash-table-remove"><function>g_hash_table_remove()</function></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>%TRUE if the key/value pair should be removed from the <link linkend="GHashTable"><type>GHashTable</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-hash-table-freeze" role="macro" condition="deprecated:">
<title>g_hash_table_freeze()</title>
<indexterm zone="g-hash-table-freeze" role="deprecated"><primary sortas="hash_table_freeze">g_hash_table_freeze</primary></indexterm><programlisting>#define             g_hash_table_freeze(hash_table)</programlisting>
<warning><para><literal>g_hash_table_freeze</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
This function is deprecated and will be removed in the next major
 release of GLib. It does nothing.
</para><variablelist role="params">
<varlistentry><term><parameter>hash_table</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GHashTable"><type>GHashTable</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-hash-table-thaw" role="macro" condition="deprecated:">
<title>g_hash_table_thaw()</title>
<indexterm zone="g-hash-table-thaw" role="deprecated"><primary sortas="hash_table_thaw">g_hash_table_thaw</primary></indexterm><programlisting>#define             g_hash_table_thaw(hash_table)</programlisting>
<warning><para><literal>g_hash_table_thaw</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
This function is deprecated and will be removed in the next major
 release of GLib. It does nothing.
</para><variablelist role="params">
<varlistentry><term><parameter>hash_table</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GHashTable"><type>GHashTable</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-hash-table-destroy" role="function">
<title>g_hash_table_destroy ()</title>
<indexterm zone="g-hash-table-destroy"><primary sortas="hash_table_destroy">g_hash_table_destroy</primary></indexterm><programlisting><link linkend="void">void</link>                g_hash_table_destroy                (<link linkend="GHashTable">GHashTable</link> *hash_table);</programlisting>
<para>
Destroys all keys and values in the <link linkend="GHashTable"><type>GHashTable</type></link> and decrements its
reference count by 1. If keys and/or values are dynamically allocated,
you should either free them first or create the <link linkend="GHashTable"><type>GHashTable</type></link> with destroy
notifiers using <link linkend="g-hash-table-new-full"><function>g_hash_table_new_full()</function></link>. In the latter case the destroy
functions you supplied will be called on all keys and values during the
destruction phase.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>hash_table</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GHashTable"><type>GHashTable</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-hash-table-ref" role="function" condition="since:2.10">
<title>g_hash_table_ref ()</title>
<indexterm zone="g-hash-table-ref" role="2.10"><primary sortas="hash_table_ref">g_hash_table_ref</primary></indexterm><programlisting><link linkend="GHashTable">GHashTable</link>*         g_hash_table_ref                    (<link linkend="GHashTable">GHashTable</link> *hash_table);</programlisting>
<para>
Atomically increments the reference count of <parameter>hash_table</parameter> by one.
This function is MT-safe and may be called from any thread.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>hash_table</parameter>&#160;:</term>
<listitem><simpara> a valid <link linkend="GHashTable"><type>GHashTable</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the passed in <link linkend="GHashTable"><type>GHashTable</type></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.10</para></refsect2>
<refsect2 id="g-hash-table-unref" role="function" condition="since:2.10">
<title>g_hash_table_unref ()</title>
<indexterm zone="g-hash-table-unref" role="2.10"><primary sortas="hash_table_unref">g_hash_table_unref</primary></indexterm><programlisting><link linkend="void">void</link>                g_hash_table_unref                  (<link linkend="GHashTable">GHashTable</link> *hash_table);</programlisting>
<para>
Atomically decrements the reference count of <parameter>hash_table</parameter> by one.
If the reference count drops to 0, all keys and values will be
destroyed, and all memory allocated by the hash table is released.
This function is MT-safe and may be called from any thread.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>hash_table</parameter>&#160;:</term>
<listitem><simpara> a valid <link linkend="GHashTable"><type>GHashTable</type></link>.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.10</para></refsect2>
<refsect2 id="GHashTableIter" role="struct">
<title>GHashTableIter</title>
<indexterm zone="GHashTableIter"><primary sortas="HashTableIter">GHashTableIter</primary></indexterm><programlisting>typedef struct {
} GHashTableIter;
</programlisting>
<para>
A GHashTableIter structure represents an iterator that can be
used to iterate over the elements of a <link linkend="GHashTable"><type>GHashTable</type></link>. GHashTableIter
structures are typically allocated on the stack and then initialized
with <link linkend="g-hash-table-iter-init"><function>g_hash_table_iter_init()</function></link>.
</para></refsect2>
<refsect2 id="g-hash-table-iter-init" role="function" condition="since:2.16">
<title>g_hash_table_iter_init ()</title>
<indexterm zone="g-hash-table-iter-init" role="2.16"><primary sortas="hash_table_iter_init">g_hash_table_iter_init</primary></indexterm><programlisting><link linkend="void">void</link>                g_hash_table_iter_init              (<link linkend="GHashTableIter">GHashTableIter</link> *iter,
                                                         <link linkend="GHashTable">GHashTable</link> *hash_table);</programlisting>
<para>
Initializes a key/value pair iterator and associates it with
<parameter>hash_table</parameter>. Modifying the hash table after calling this function
invalidates the returned iterator.
<informalexample><programlisting>
GHashTableIter iter;
gpointer key, value;

g_hash_table_iter_init (&amp;iter, hash_table);
while (g_hash_table_iter_next (&amp;iter, &amp;key, &amp;value)) 
  {
    /&ast; do something with key and value &ast;/
  }
</programlisting></informalexample></para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>iter</parameter>&#160;:</term>
<listitem><simpara> an uninitialized <link linkend="GHashTableIter"><type>GHashTableIter</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>hash_table</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GHashTable"><type>GHashTable</type></link>.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.16</para></refsect2>
<refsect2 id="g-hash-table-iter-next" role="function" condition="since:2.16">
<title>g_hash_table_iter_next ()</title>
<indexterm zone="g-hash-table-iter-next" role="2.16"><primary sortas="hash_table_iter_next">g_hash_table_iter_next</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_hash_table_iter_next              (<link linkend="GHashTableIter">GHashTableIter</link> *iter,
                                                         <link linkend="gpointer">gpointer</link> *key,
                                                         <link linkend="gpointer">gpointer</link> *value);</programlisting>
<para>
Advances <parameter>iter</parameter> and retrieves the key and/or value that are now
pointed to as a result of this advancement. If <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> is returned,
<parameter>key</parameter> and <parameter>value</parameter> are not set, and the iterator becomes invalid.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>iter</parameter>&#160;:</term>
<listitem><simpara> an initialized <link linkend="GHashTableIter"><type>GHashTableIter</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>key</parameter>&#160;:</term>
<listitem><simpara> a location to store the key, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&#160;:</term>
<listitem><simpara> a location to store the value, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> if the end of the <link linkend="GHashTable"><type>GHashTable</type></link> has been reached.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.16</para></refsect2>
<refsect2 id="g-hash-table-iter-get-hash-table" role="function" condition="since:2.16">
<title>g_hash_table_iter_get_hash_table ()</title>
<indexterm zone="g-hash-table-iter-get-hash-table" role="2.16"><primary sortas="hash_table_iter_get_hash_table">g_hash_table_iter_get_hash_table</primary></indexterm><programlisting><link linkend="GHashTable">GHashTable</link>*         g_hash_table_iter_get_hash_table    (<link linkend="GHashTableIter">GHashTableIter</link> *iter);</programlisting>
<para>
Returns the <link linkend="GHashTable"><type>GHashTable</type></link> associated with <parameter>iter</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>iter</parameter>&#160;:</term>
<listitem><simpara> an initialized <link linkend="GHashTableIter"><type>GHashTableIter</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the <link linkend="GHashTable"><type>GHashTable</type></link> associated with <parameter>iter</parameter>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.16</para></refsect2>
<refsect2 id="g-hash-table-iter-remove" role="function" condition="since:2.16">
<title>g_hash_table_iter_remove ()</title>
<indexterm zone="g-hash-table-iter-remove" role="2.16"><primary sortas="hash_table_iter_remove">g_hash_table_iter_remove</primary></indexterm><programlisting><link linkend="void">void</link>                g_hash_table_iter_remove            (<link linkend="GHashTableIter">GHashTableIter</link> *iter);</programlisting>
<para>
Removes the key/value pair currently pointed to by the iterator
from its associated <link linkend="GHashTable"><type>GHashTable</type></link>. Can only be called after
<link linkend="g-hash-table-iter-next"><function>g_hash_table_iter_next()</function></link> returned <link linkend="TRUE--CAPS"><literal>TRUE</literal></link>, and cannot be called more
than once for the same key/value pair.
</para>
<para>
If the <link linkend="GHashTable"><type>GHashTable</type></link> was created using <link linkend="g-hash-table-new-full"><function>g_hash_table_new_full()</function></link>, the
key and value are freed using the supplied destroy functions, otherwise
you have to make sure that any dynamically allocated values are freed 
yourself.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>iter</parameter>&#160;:</term>
<listitem><simpara> an initialized <link linkend="GHashTableIter"><type>GHashTableIter</type></link>.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.16</para></refsect2>
<refsect2 id="g-hash-table-iter-steal" role="function" condition="since:2.16">
<title>g_hash_table_iter_steal ()</title>
<indexterm zone="g-hash-table-iter-steal" role="2.16"><primary sortas="hash_table_iter_steal">g_hash_table_iter_steal</primary></indexterm><programlisting><link linkend="void">void</link>                g_hash_table_iter_steal             (<link linkend="GHashTableIter">GHashTableIter</link> *iter);</programlisting>
<para>
Removes the key/value pair currently pointed to by the iterator
from its associated <link linkend="GHashTable"><type>GHashTable</type></link>, without calling the key and value
destroy functions. Can only be called after
<link linkend="g-hash-table-iter-next"><function>g_hash_table_iter_next()</function></link> returned <link linkend="TRUE--CAPS"><literal>TRUE</literal></link>, and cannot be called more
than once for the same key/value pair.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>iter</parameter>&#160;:</term>
<listitem><simpara> an initialized <link linkend="GHashTableIter"><type>GHashTableIter</type></link>.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.16</para></refsect2>
<refsect2 id="g-direct-equal" role="function">
<title>g_direct_equal ()</title>
<indexterm zone="g-direct-equal"><primary sortas="direct_equal">g_direct_equal</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_direct_equal                      (<link linkend="gconstpointer">gconstpointer</link> v1,
                                                         <link linkend="gconstpointer">gconstpointer</link> v2);</programlisting>
<para>
Compares two <link linkend="gpointer"><type>gpointer</type></link> arguments and returns <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if they are equal.
It can be passed to <link linkend="g-hash-table-new"><function>g_hash_table_new()</function></link> as the <parameter>key_equal_func</parameter>
parameter, when using pointers as keys in a <link linkend="GHashTable"><type>GHashTable</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>v1</parameter>&#160;:</term>
<listitem><simpara> a key.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>v2</parameter>&#160;:</term>
<listitem><simpara> a key to compare with <parameter>v1</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the two keys match.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-direct-hash" role="function">
<title>g_direct_hash ()</title>
<indexterm zone="g-direct-hash"><primary sortas="direct_hash">g_direct_hash</primary></indexterm><programlisting><link linkend="guint">guint</link>               g_direct_hash                       (<link linkend="gconstpointer">gconstpointer</link> v);</programlisting>
<para>
Converts a gpointer to a hash value.
It can be passed to <link linkend="g-hash-table-new"><function>g_hash_table_new()</function></link> as the <parameter>hash_func</parameter> parameter, 
when using pointers as keys in a <link linkend="GHashTable"><type>GHashTable</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>v</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="gpointer"><type>gpointer</type></link> key
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a hash value corresponding to the key.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-int-equal" role="function">
<title>g_int_equal ()</title>
<indexterm zone="g-int-equal"><primary sortas="int_equal">g_int_equal</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_int_equal                         (<link linkend="gconstpointer">gconstpointer</link> v1,
                                                         <link linkend="gconstpointer">gconstpointer</link> v2);</programlisting>
<para>
Compares the two <link linkend="gint"><type>gint</type></link> values being pointed to and returns 
<link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if they are equal.
It can be passed to <link linkend="g-hash-table-new"><function>g_hash_table_new()</function></link> as the <parameter>key_equal_func</parameter>
parameter, when using pointers to integers as keys in a <link linkend="GHashTable"><type>GHashTable</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>v1</parameter>&#160;:</term>
<listitem><simpara> a pointer to a <link linkend="gint"><type>gint</type></link> key.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>v2</parameter>&#160;:</term>
<listitem><simpara> a pointer to a <link linkend="gint"><type>gint</type></link> key to compare with <parameter>v1</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the two keys match.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-int-hash" role="function">
<title>g_int_hash ()</title>
<indexterm zone="g-int-hash"><primary sortas="int_hash">g_int_hash</primary></indexterm><programlisting><link linkend="guint">guint</link>               g_int_hash                          (<link linkend="gconstpointer">gconstpointer</link> v);</programlisting>
<para>
Converts a pointer to a <link linkend="gint"><type>gint</type></link> to a hash value.
It can be passed to <link linkend="g-hash-table-new"><function>g_hash_table_new()</function></link> as the <parameter>hash_func</parameter> parameter, 
when using pointers to integers values as keys in a <link linkend="GHashTable"><type>GHashTable</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>v</parameter>&#160;:</term>
<listitem><simpara> a pointer to a <link linkend="gint"><type>gint</type></link> key
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a hash value corresponding to the key.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-int64-equal" role="function" condition="since:2.22">
<title>g_int64_equal ()</title>
<indexterm zone="g-int64-equal" role="2.22"><primary sortas="int64_equal">g_int64_equal</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_int64_equal                       (<link linkend="gconstpointer">gconstpointer</link> v1,
                                                         <link linkend="gconstpointer">gconstpointer</link> v2);</programlisting>
<para>
Compares the two <link linkend="gint64"><type>gint64</type></link> values being pointed to and returns 
<link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if they are equal.
It can be passed to <link linkend="g-hash-table-new"><function>g_hash_table_new()</function></link> as the <parameter>key_equal_func</parameter>
parameter, when using pointers to 64-bit integers as keys in a <link linkend="GHashTable"><type>GHashTable</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>v1</parameter>&#160;:</term>
<listitem><simpara> a pointer to a <link linkend="gint64"><type>gint64</type></link> key.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>v2</parameter>&#160;:</term>
<listitem><simpara> a pointer to a <link linkend="gint64"><type>gint64</type></link> key to compare with <parameter>v1</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the two keys match.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.22</para></refsect2>
<refsect2 id="g-int64-hash" role="function" condition="since:2.22">
<title>g_int64_hash ()</title>
<indexterm zone="g-int64-hash" role="2.22"><primary sortas="int64_hash">g_int64_hash</primary></indexterm><programlisting><link linkend="guint">guint</link>               g_int64_hash                        (<link linkend="gconstpointer">gconstpointer</link> v);</programlisting>
<para>
Converts a pointer to a <link linkend="gint64"><type>gint64</type></link> to a hash value.
It can be passed to <link linkend="g-hash-table-new"><function>g_hash_table_new()</function></link> as the <parameter>hash_func</parameter> parameter, 
when using pointers to 64-bit integers values as keys in a <link linkend="GHashTable"><type>GHashTable</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>v</parameter>&#160;:</term>
<listitem><simpara> a pointer to a <link linkend="gint64"><type>gint64</type></link> key
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a hash value corresponding to the key.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.22</para></refsect2>
<refsect2 id="g-double-equal" role="function" condition="since:2.22">
<title>g_double_equal ()</title>
<indexterm zone="g-double-equal" role="2.22"><primary sortas="double_equal">g_double_equal</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_double_equal                      (<link linkend="gconstpointer">gconstpointer</link> v1,
                                                         <link linkend="gconstpointer">gconstpointer</link> v2);</programlisting>
<para>
Compares the two <link linkend="gdouble"><type>gdouble</type></link> values being pointed to and returns 
<link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if they are equal.
It can be passed to <link linkend="g-hash-table-new"><function>g_hash_table_new()</function></link> as the <parameter>key_equal_func</parameter>
parameter, when using pointers to doubles as keys in a <link linkend="GHashTable"><type>GHashTable</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>v1</parameter>&#160;:</term>
<listitem><simpara> a pointer to a <link linkend="gdouble"><type>gdouble</type></link> key.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>v2</parameter>&#160;:</term>
<listitem><simpara> a pointer to a <link linkend="gdouble"><type>gdouble</type></link> key to compare with <parameter>v1</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the two keys match.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.22</para></refsect2>
<refsect2 id="g-double-hash" role="function" condition="since:2.22">
<title>g_double_hash ()</title>
<indexterm zone="g-double-hash" role="2.22"><primary sortas="double_hash">g_double_hash</primary></indexterm><programlisting><link linkend="guint">guint</link>               g_double_hash                       (<link linkend="gconstpointer">gconstpointer</link> v);</programlisting>
<para>
Converts a pointer to a <link linkend="gdouble"><type>gdouble</type></link> to a hash value.
It can be passed to <link linkend="g-hash-table-new"><function>g_hash_table_new()</function></link> as the <parameter>hash_func</parameter> parameter, 
when using pointers to doubles as keys in a <link linkend="GHashTable"><type>GHashTable</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>v</parameter>&#160;:</term>
<listitem><simpara> a pointer to a <link linkend="gdouble"><type>gdouble</type></link> key
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a hash value corresponding to the key.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.22</para></refsect2>
<refsect2 id="g-str-equal" role="function">
<title>g_str_equal ()</title>
<indexterm zone="g-str-equal"><primary sortas="str_equal">g_str_equal</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_str_equal                         (<link linkend="gconstpointer">gconstpointer</link> v1,
                                                         <link linkend="gconstpointer">gconstpointer</link> v2);</programlisting>
<para>
Compares two strings for byte-by-byte equality and returns <link linkend="TRUE--CAPS"><literal>TRUE</literal></link>
if they are equal. It can be passed to <link linkend="g-hash-table-new"><function>g_hash_table_new()</function></link> as the
<parameter>key_equal_func</parameter> parameter, when using strings as keys in a <link linkend="GHashTable"><type>GHashTable</type></link>.
</para>
<para>
Note that this function is primarily meant as a hash table comparison
function. For a general-purpose, <link linkend="NULL--CAPS"><literal>NULL</literal></link>-safe string comparison function,
see <link linkend="g-strcmp0"><function>g_strcmp0()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>v1</parameter>&#160;:</term>
<listitem><simpara> a key
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>v2</parameter>&#160;:</term>
<listitem><simpara> a key to compare with <parameter>v1</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the two keys match
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-str-hash" role="function">
<title>g_str_hash ()</title>
<indexterm zone="g-str-hash"><primary sortas="str_hash">g_str_hash</primary></indexterm><programlisting><link linkend="guint">guint</link>               g_str_hash                          (<link linkend="gconstpointer">gconstpointer</link> v);</programlisting>
<para>
Converts a string to a hash value.
It can be passed to <link linkend="g-hash-table-new"><function>g_hash_table_new()</function></link> as the <parameter>hash_func</parameter> 
parameter, when using strings as keys in a <link linkend="GHashTable"><type>GHashTable</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>v</parameter>&#160;:</term>
<listitem><simpara> a string key
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a hash value corresponding to the key
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
