[glib/wip/refptr: 5/5] docs: Mention g_string_ref_new() in g_strdup()
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/refptr: 5/5] docs: Mention g_string_ref_new() in g_strdup()
- Date: Sun, 8 Feb 2015 13:41:25 +0000 (UTC)
commit e0d5ae394de81f136943e43f530df03e3197dc7b
Author: Emmanuele Bassi <ebassi gnome org>
Date: Sat Feb 7 12:21:55 2015 +0000
docs: Mention g_string_ref_new() in g_strdup()
Instead of duplicating strings, using the reference counted version may
be more efficient.
https://bugzilla.gnome.org/show_bug.cgi?id=622721
glib/gstrfuncs.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/glib/gstrfuncs.c b/glib/gstrfuncs.c
index 9498d81..42e256f 100644
--- a/glib/gstrfuncs.c
+++ b/glib/gstrfuncs.c
@@ -342,6 +342,9 @@ get_C_locale (void)
* The returned string should be freed with g_free()
* when no longer needed.
*
+ * You may want to use g_string_ref_new() in order to use
+ * reference counted strings, instead of duplicating them.
+ *
* Returns: a newly-allocated copy of @str
*/
gchar*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]