[glib/glib-2-30] docs: Improve g_variant_loop() docs
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-30] docs: Improve g_variant_loop() docs
- Date: Fri, 11 Nov 2011 21:23:06 +0000 (UTC)
commit 9aa02d9d989ea7440b1c5a62041d038dbf124b50
Author: Benjamin Otte <otte redhat com>
Date: Sun Oct 16 12:58:29 2011 -0700
docs: Improve g_variant_loop() docs
Typo fix and changing "is not recommended" to the nice version of "don't
do this", aka "causes undefined behavior".
gio/glocalfileinfo.c | 5 ++++-
glib/gvariant.c | 4 ++--
2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c
index 6c1fe20..e581504 100644
--- a/gio/glocalfileinfo.c
+++ b/gio/glocalfileinfo.c
@@ -1439,7 +1439,10 @@ _g_local_file_info_get (const char *basename,
/* Avoid stat in trivial case */
if (attribute_matcher == NULL)
- return info;
+ {
+ g_file_info_unset_attribute_mask (info);
+ return info;
+ }
#ifndef G_OS_WIN32
res = g_lstat (path, &statbuf);
diff --git a/glib/gvariant.c b/glib/gvariant.c
index 5f49c8c..bddf3de 100644
--- a/glib/gvariant.c
+++ b/glib/gvariant.c
@@ -4707,7 +4707,7 @@ g_variant_iter_next (GVariantIter *iter,
* @iter: a #GVariantIter
* @format_string: a GVariant format string
* @...: the arguments to unpack the value into
- * @returns: %TRUE if a value was unpacked, or %FALSE if there as no
+ * @returns: %TRUE if a value was unpacked, or %FALSE if there was no
* value
*
* Gets the next item in the container and unpacks it into the variable
@@ -4728,7 +4728,7 @@ g_variant_iter_next (GVariantIter *iter,
* function with a string constant for the format string and the same
* string constant must be used each time. Mixing calls to this
* function and g_variant_iter_next() or g_variant_iter_next_value() on
- * the same iterator is not recommended.
+ * the same iterator causes undefined behavior.
*
* See the section on <link linkend='gvariant-format-strings'>GVariant
* Format Strings</link>.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]