Commit 8ad668c7 authored by Matthias Clasen's avatar Matthias Clasen
Browse files

Improve docs

svn path=/trunk/; revision=7896
parent 45fdc135
2009-02-22 Matthias Clasen <mclasen@redhat.com>
Bug 572464 – Doc for g_file_get_contents
* glib/gfileutils.c (g_file_get_contents): Improve docs. Pointed
out by Øystein Johansen.
2009-02-22 Matthias Clasen <mclasen@redhat.com> 2009-02-22 Matthias Clasen <mclasen@redhat.com>
Bug 572672 – glib/gthread.c: argument is different type Bug 572672 – glib/gthread.c: argument is different type
......
...@@ -798,19 +798,20 @@ get_contents_win32 (const gchar *filename, ...@@ -798,19 +798,20 @@ get_contents_win32 (const gchar *filename,
/** /**
* g_file_get_contents: * g_file_get_contents:
* @filename: name of a file to read contents from, in the GLib file name encoding * @filename: name of a file to read contents from, in the GLib file name encoding
* @contents: location to store an allocated string * @contents: location to store an allocated string, use g_free() to free
* the returned string
* @length: location to store length in bytes of the contents, or %NULL * @length: location to store length in bytes of the contents, or %NULL
* @error: return location for a #GError, or %NULL * @error: return location for a #GError, or %NULL
* *
* Reads an entire file into allocated memory, with good error * Reads an entire file into allocated memory, with good error
* checking. * checking.
* *
* If the call was successful, it returns %TRUE and sets @contents to the file * If the call was successful, it returns %TRUE and sets @contents to the file
* contents and @length to the length of the file contents in bytes. The string * contents and @length to the length of the file contents in bytes. The string
* stored in @contents will be nul-terminated, so for text files you can pass * stored in @contents will be nul-terminated, so for text files you can pass
* %NULL for the @length argument. If the call was not successful, it returns * %NULL for the @length argument. If the call was not successful, it returns
* %FALSE and sets @error. The error domain is #G_FILE_ERROR. Possible error * %FALSE and sets @error. The error domain is #G_FILE_ERROR. Possible error
* codes are those in the #GFileError enumeration. In the error case, * codes are those in the #GFileError enumeration. In the error case,
* @contents is set to %NULL and @length is set to zero. * @contents is set to %NULL and @length is set to zero.
* *
* Return value: %TRUE on success, %FALSE if an error occurred * Return value: %TRUE on success, %FALSE if an error occurred
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment