From: Matthias Clasen Date: Tue, 27 May 2003 22:25:03 +0000 (+0000) Subject: Document that g_strdup() and g_strndup() accept NULL. (#106987, Christian X-Git-Tag: GLIB_2_3_0~192 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d1db6f8b36430243085a9587b35a473d3f3a2d71;p=platform%2Fupstream%2Fglib.git Document that g_strdup() and g_strndup() accept NULL. (#106987, Christian 2003-05-28 Matthias Clasen * glib/tmpl/string_utils.sgml: Document that g_strdup() and g_strndup() accept NULL. (#106987, Christian Biere) --- diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index e52b143..480aa96 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,8 @@ +2003-05-28 Matthias Clasen + + * glib/tmpl/string_utils.sgml: Document that g_strdup() and + g_strndup() accept NULL. (#106987, Christian Biere) + 2003-05-12 Matthias Clasen * glib/cross.sgml: Fix a duplicate id left by copy-and-paste. diff --git a/docs/reference/glib/tmpl/string_utils.sgml b/docs/reference/glib/tmpl/string_utils.sgml index 463b1f8..2778f4d 100644 --- a/docs/reference/glib/tmpl/string_utils.sgml +++ b/docs/reference/glib/tmpl/string_utils.sgml @@ -27,11 +27,12 @@ in order to use the printf() functions. Duplicates a string. +If @str is %NULL it returns %NULL. The returned string should be freed when no longer needed. @str: the string to duplicate. -@Returns: a newly-allocated copy of @str. +@Returns: a newly-allocated copy of @str. @@ -39,6 +40,7 @@ The returned string should be freed when no longer needed. Duplicates the first @n characters of a string, returning a newly-allocated buffer @n + 1 characters long which will always be nul-terminated. If @str is less than @n characters long the buffer is padded with nuls. +If @str is %NULL it returns %NULL. The returned value should be freed when no longer needed.