diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2018-06-12 14:05:02 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2018-06-12 14:06:25 +0100 |
commit | 25012bf96c3ec6ae54dd2f31f1de4cadb671c9fd (patch) | |
tree | e8a9a9a6c0a53b79546117215d93295397da2d6b /glib/grefstring.h | |
parent | b606ce30a2aadd7f393777634b5fd3cdd6258f3d (diff) | |
download | glib-refcount-box.tar.gz |
Add length accessor for GRefStringrefcount-box
Since we store the size of the allocation in the underlying ArcBox, we
can get a constant time getter for the length of the string.
Diffstat (limited to 'glib/grefstring.h')
-rw-r--r-- | glib/grefstring.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/glib/grefstring.h b/glib/grefstring.h index f2156fef4..2afe23a73 100644 --- a/glib/grefstring.h +++ b/glib/grefstring.h @@ -33,6 +33,9 @@ char * g_ref_string_acquire (char *str); GLIB_AVAILABLE_IN_2_58 void g_ref_string_release (char *str); +GLIB_AVAILABLE_IN_2_58 +gsize g_ref_string_length (char *str); + typedef char GRefString; G_END_DECLS |