[glib] gfileutils: fix docs/annotations for temp file methods
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gfileutils: fix docs/annotations for temp file methods
- Date: Wed, 24 Aug 2011 17:23:57 +0000 (UTC)
commit 2cd3c200687751c9cc26774f650b7651bffcc598
Author: Dan Winship <danw gnome org>
Date: Mon Aug 22 11:37:48 2011 -0400
gfileutils: fix docs/annotations for temp file methods
https://bugzilla.gnome.org/show_bug.cgi?id=657084
glib/gfileutils.c | 40 ++++++++++++++++++++++------------------
1 files changed, 22 insertions(+), 18 deletions(-)
---
diff --git a/glib/gfileutils.c b/glib/gfileutils.c
index 58e76d7..23b1624 100644
--- a/glib/gfileutils.c
+++ b/glib/gfileutils.c
@@ -1253,7 +1253,7 @@ wrap_mkdir (gchar *tmpl,
/**
* g_mkdtemp_full:
- * @tmpl: template directory name
+ * @tmpl: (type filename): template directory name
* @mode: permissions to create the temporary directory with
*
* Creates a temporary directory. See the mkdtemp() documentation
@@ -1269,7 +1269,8 @@ wrap_mkdir (gchar *tmpl,
* should be in UTF-8.
*
* Return value: A pointer to @tmpl, which has been modified
- * to hold the directory name. In case of errors, %NULL is returned.
+ * to hold the directory name. In case of errors, %NULL is
+ * returned, and %errno will be set.
*
* Since: 2.26
*/
@@ -1285,7 +1286,7 @@ g_mkdtemp_full (gchar *tmpl,
/**
* g_mkdtemp:
- * @tmpl: template directory name
+ * @tmpl: (type filename): template directory name
*
* Creates a temporary directory. See the mkdtemp() documentation
* on most UNIX-like systems.
@@ -1300,7 +1301,8 @@ g_mkdtemp_full (gchar *tmpl,
* on Windows it should be in UTF-8.
*
* Return value: A pointer to @tmpl, which has been modified
- * to hold the directory name. In case of errors, NULL is returned.
+ * to hold the directory name. In case of errors, %NULL is
+ * returned and %errno will be set.
*
* Since: 2.26
*/
@@ -1312,7 +1314,7 @@ g_mkdtemp (gchar *tmpl)
/**
* g_mkstemp_full:
- * @tmpl: template filename
+ * @tmpl: (type filename): template filename
* @flags: flags to pass to an open() call in addition to O_EXCL
* and O_CREAT, which are passed automatically
* @mode: permissions to create the temporary file with
@@ -1331,7 +1333,8 @@ g_mkdtemp (gchar *tmpl)
*
* Return value: A file handle (as from open()) to the file
* opened for reading and writing. The file handle should be
- * closed with close(). In case of errors, -1 is returned.
+ * closed with close(). In case of errors, -1 is returned
+ * and %errno will be set.
*
* Since: 2.22
*/
@@ -1347,7 +1350,7 @@ g_mkstemp_full (gchar *tmpl,
/**
* g_mkstemp:
- * @tmpl: template filename
+ * @tmpl: (type filename): template filename
*
* Opens a temporary file. See the mkstemp() documentation
* on most UNIX-like systems.
@@ -1363,7 +1366,8 @@ g_mkstemp_full (gchar *tmpl,
* Return value: A file handle (as from open()) to the file
* opened for reading and writing. The file is opened in binary
* mode on platforms where there is a difference. The file handle
- * should be closed with close(). In case of errors, -1 is returned.
+ * should be closed with close(). In case of errors, -1 is
+ * returned and %errno will be set.
*/
gint
g_mkstemp (gchar *tmpl)
@@ -1453,9 +1457,10 @@ g_get_tmp_name (const gchar *tmpl,
/**
* g_file_open_tmp:
- * @tmpl: Template for file name, as in g_mkstemp(), basename only,
- * or %NULL, to a default template
- * @name_used: location to store actual name used, or %NULL
+ * @tmpl: (type filename) (allow-none): Template for file name, as in
+ * g_mkstemp(), basename only, or %NULL for a default template
+ * @name_used: (out) (type filename): location to store actual name used,
+ * or %NULL
* @error: return location for a #GError
*
* Opens a file for writing in the preferred directory for temporary
@@ -1506,9 +1511,8 @@ g_file_open_tmp (const gchar *tmpl,
/**
* g_dir_make_tmp:
- * @tmpl: Template for directory name, as in g_mkdtemp(), basename only,
- * or %NULL, to a default template
- * @name_used: location to store actual name used, or %NULL
+ * @tmpl: (type filename) (allow-none): Template for directory name,
+ * as in g_mkdtemp(), basename only, or %NULL for a default template
* @error: return location for a #GError
*
* Creates a subdirectory in the preferred directory for temporary
@@ -1523,10 +1527,10 @@ g_file_open_tmp (const gchar *tmpl,
* Note that in contrast to g_mkdtemp() (and mkdtemp()) @tmpl is not
* modified, and might thus be a read-only literal string.
*
- * Return value: The actual name used. This string should be freed
- * with g_free() when not needed any longer and is is in the GLib
- * file name encoding. In case of errors, %NULL is returned
- * and @error will be set.
+ * Return value: (type filename): The actual name used. This string
+ * should be freed with g_free() when not needed any longer and is
+ * is in the GLib file name encoding. In case of errors, %NULL is
+ * returned and @error will be set.
*
* Since: 2.30
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]