diff options
author | Matthias Clasen <mclasen@redhat.com> | 2005-08-31 14:25:45 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-08-31 14:25:45 +0000 |
commit | 70af0de0ef26cd157cdf012023ebf1c95f874c51 (patch) | |
tree | 9cdf77758906cc67f9a5c6e0c7f60f57fcecfac2 /docs | |
parent | 9b9ec85b28bcd6d3affa31c4949bc8a9b61166a2 (diff) | |
download | glib-70af0de0ef26cd157cdf012023ebf1c95f874c51.tar.gz |
Add functions to intern strings.
2005-08-31 Matthias Clasen <mclasen@redhat.com>
* glib/glib.symbols:
* glib/gquark.h:
* glib/gdataset.c: Add functions to intern strings.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/reference/ChangeLog | 5 | ||||
-rw-r--r-- | docs/reference/glib/glib-sections.txt | 3 | ||||
-rw-r--r-- | docs/reference/glib/tmpl/quarks.sgml | 7 |
3 files changed, 14 insertions, 1 deletions
diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 2d14ed2b3..5ffbd31ac 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,8 @@ +2005-08-31 Matthias Clasen <mclasen@redhat.com> + + * glib/tmpl/quarks.sgml: + * glib/glib-sections.txt: Add string interning functions. + 2005-08-30 Matthias Clasen <mclasen@redhat.com> * glib/tmpl/arrays.sgml: diff --git a/docs/reference/glib/glib-sections.txt b/docs/reference/glib/glib-sections.txt index 79ed47818..80cd93da0 100644 --- a/docs/reference/glib/glib-sections.txt +++ b/docs/reference/glib/glib-sections.txt @@ -1958,7 +1958,8 @@ g_quark_from_string g_quark_from_static_string g_quark_to_string g_quark_try_string - +g_intern_string +g_intern_static_string </SECTION> <SECTION> diff --git a/docs/reference/glib/tmpl/quarks.sgml b/docs/reference/glib/tmpl/quarks.sgml index 7a8159edf..72bc1a7a2 100644 --- a/docs/reference/glib/tmpl/quarks.sgml +++ b/docs/reference/glib/tmpl/quarks.sgml @@ -25,6 +25,13 @@ To find the string corresponding to a given #GQuark, use g_quark_to_string(). <para> To find the #GQuark corresponding to a given string, use g_quark_try_string(). </para> +<para> +Another use for the string pool maintained for the quark functions is string +interning, using g_intern_string() or g_intern_static_string(). An interned string +is a canonical representation for a string. One important advantage of interned strings +is that they can be compared for equality by a simple pointer comparision, rather than +using strcmp(). +</para> <!-- ##### SECTION See_Also ##### --> <para> |