[glib/gsettings] GVariant gtk-doc fixups
- From: Ryan Lortie <ryanl src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [glib/gsettings] GVariant gtk-doc fixups
- Date: Tue, 8 Sep 2009 18:46:06 +0000 (UTC)
commit 4967cf27d804863fd3bf6f64ab695e8debcfe534
Author: Ryan Lortie <desrt desrt ca>
Date: Tue Sep 8 14:45:08 2009 -0400
GVariant gtk-doc fixups
docs/reference/glib/glib-sections.txt | 3 +-
docs/reference/glib/tmpl/misc_utils.sgml | 7 ++
docs/reference/glib/tmpl/threads.sgml | 4 +-
glib/gthread.h | 4 +-
glib/gvariant-markup.c | 2 +-
glib/gvariant-util.c | 94 +++++++++++++++---------------
glib/gvarianttype.c | 20 +++---
glib/gvarianttype.h | 2 +-
8 files changed, 72 insertions(+), 64 deletions(-)
---
diff --git a/docs/reference/glib/glib-sections.txt b/docs/reference/glib/glib-sections.txt
index 27c8bfd..0859202 100644
--- a/docs/reference/glib/glib-sections.txt
+++ b/docs/reference/glib/glib-sections.txt
@@ -2718,7 +2718,7 @@ G_VARIANT_TYPE_ANY
G_VARIANT_TYPE_ANY_BASIC
G_VARIANT_TYPE_ANY_MAYBE
G_VARIANT_TYPE_ANY_ARRAY
-G_VARIANT_TYPE_ANY_STRUCT
+G_VARIANT_TYPE_ANY_TUPLE
G_VARIANT_TYPE_UNIT
G_VARIANT_TYPE_ANY_DICT_ENTRY
G_VARIANT_TYPE_ANY_DICTIONARY
@@ -2872,6 +2872,7 @@ g_variant_from_file
g_variant_from_slice
g_variant_get_data
g_variant_get_size
+</SECTION>
<SECTION>
<FILE>ghostutils</FILE>
diff --git a/docs/reference/glib/tmpl/misc_utils.sgml b/docs/reference/glib/tmpl/misc_utils.sgml
index 8038d8c..9cfb65f 100644
--- a/docs/reference/glib/tmpl/misc_utils.sgml
+++ b/docs/reference/glib/tmpl/misc_utils.sgml
@@ -165,6 +165,13 @@ These are portable utility functions.
@Returns:
+<!-- ##### FUNCTION g_reload_user_special_dirs_cache ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### FUNCTION g_get_host_name ##### -->
<para>
diff --git a/docs/reference/glib/tmpl/threads.sgml b/docs/reference/glib/tmpl/threads.sgml
index 8a55892..b15adf3 100644
--- a/docs/reference/glib/tmpl/threads.sgml
+++ b/docs/reference/glib/tmpl/threads.sgml
@@ -1813,7 +1813,7 @@ variable.
</para>
- lock:
+ address:
@lock_bit:
@@ -1822,7 +1822,7 @@ variable.
</para>
- lock:
+ address:
@lock_bit:
diff --git a/glib/gthread.h b/glib/gthread.h
index a677214..bd4b4d7 100644
--- a/glib/gthread.h
+++ b/glib/gthread.h
@@ -305,9 +305,9 @@ void g_static_rw_lock_free (GStaticRWLock* lock);
void g_thread_foreach (GFunc thread_func,
gpointer user_data);
-void g_bit_lock (volatile gint *lock,
+void g_bit_lock (volatile gint *address,
gint lock_bit);
-void g_bit_unlock (volatile gint *lock,
+void g_bit_unlock (volatile gint *address,
gint lock_bit);
typedef enum
diff --git a/glib/gvariant-markup.c b/glib/gvariant-markup.c
index e135234..476ef58 100644
--- a/glib/gvariant-markup.c
+++ b/glib/gvariant-markup.c
@@ -82,7 +82,7 @@ g_variant_markup_print (GVariant *value,
};
/**
- * g_variant_markup_print:
+ * g_variant_markup_print_string:
* @value: a #GVariant
* @string: a #GString, or %NULL
* @newlines: %TRUE if newlines should be printed
diff --git a/glib/gvariant-util.c b/glib/gvariant-util.c
index 5b3e6b5..79fdbc4 100644
--- a/glib/gvariant-util.c
+++ b/glib/gvariant-util.c
@@ -87,7 +87,7 @@ g_variant_iter_init (GVariantIter *iter,
}
/**
- * g_variant_iter_next:
+ * g_variant_iter_next_value:
* @iter: a #GVariantIter
* @returns: a #GVariant for the next child
*
@@ -980,7 +980,7 @@ g_variant_builder_add_value (GVariantBuilder *builder,
/**
* g_variant_builder_open:
* @parent: a #GVariantBuilder
- * @class: a #GVariantTypeClass
+ * @tclass: a #GVariantTypeClass
* @type: a #GVariantType, or %NULL
* @returns: a new (child) #GVariantBuilder
*
@@ -1002,7 +1002,7 @@ g_variant_builder_add_value (GVariantBuilder *builder,
**/
GVariantBuilder *
g_variant_builder_open (GVariantBuilder *parent,
- GVariantTypeClass class,
+ GVariantTypeClass tclass,
const GVariantType *type)
{
GVariantBuilder *child;
@@ -1010,22 +1010,22 @@ g_variant_builder_open (GVariantBuilder *parent,
g_return_val_if_fail (parent != NULL, NULL);
- if G_UNLIKELY (!g_variant_builder_check_add (parent, class, type, &error))
+ if G_UNLIKELY (!g_variant_builder_check_add (parent, tclass, type, &error))
g_error ("g_variant_builder_open: %s", error->message);
if G_UNLIKELY (parent->has_child)
g_error ("GVariantBuilder already has open child");
- child = g_variant_builder_new (class, type);
+ child = g_variant_builder_new (tclass, type);
if (parent->expected2)
{
- if (class == G_VARIANT_TYPE_CLASS_MAYBE ||
- class == G_VARIANT_TYPE_CLASS_ARRAY)
+ if (tclass == G_VARIANT_TYPE_CLASS_MAYBE ||
+ tclass == G_VARIANT_TYPE_CLASS_ARRAY)
child->expected2 = g_variant_type_element (parent->expected2);
- if (class == G_VARIANT_TYPE_CLASS_TUPLE ||
- class == G_VARIANT_TYPE_CLASS_DICT_ENTRY)
+ if (tclass == G_VARIANT_TYPE_CLASS_TUPLE ||
+ tclass == G_VARIANT_TYPE_CLASS_DICT_ENTRY)
child->expected2 = g_variant_type_first (parent->expected2);
/* in variant case, we don't want to propagate the type */
@@ -1076,18 +1076,18 @@ g_variant_builder_close (GVariantBuilder *child)
/**
* g_variant_builder_new:
- * @class: a container #GVariantTypeClass
- * @type: a type contained in @class, or %NULL
+ * @tclass: a container #GVariantTypeClass
+ * @type: a type contained in @tclass, or %NULL
* @returns: a #GVariantBuilder
*
* Creates a new #GVariantBuilder.
*
- * @class must be specified and must be a container type.
+ * @tclass must be specified and must be a container type.
*
* If @type is given, it constrains the child values that it is
- * permissible to add. If @class is not %G_VARIANT_TYPE_CLASS_VARIANT
- * then @type must be contained in @class and will match the type of
- * the final value. If @class is %G_VARIANT_TYPE_CLASS_VARIANT then
+ * permissible to add. If @tclass is not %G_VARIANT_TYPE_CLASS_VARIANT
+ * then @type must be contained in @tclass and will match the type of
+ * the final value. If @tclass is %G_VARIANT_TYPE_CLASS_VARIANT then
* @type must match the value that must be added to the variant.
*
* After the builder is created, values are added using
@@ -1097,26 +1097,26 @@ g_variant_builder_close (GVariantBuilder *child)
* the process.
**/
GVariantBuilder *
-g_variant_builder_new (GVariantTypeClass class,
+g_variant_builder_new (GVariantTypeClass tclass,
const GVariantType *type)
{
GVariantBuilder *builder;
- g_assert (g_variant_type_class_is_container (class));
- g_assert (class == G_VARIANT_TYPE_CLASS_VARIANT ||
- type == NULL || g_variant_type_get_class (type) == class);
+ g_assert (g_variant_type_class_is_container (tclass));
+ g_assert (tclass == G_VARIANT_TYPE_CLASS_VARIANT ||
+ type == NULL || g_variant_type_get_class (type) == tclass);
builder = g_slice_new (GVariantBuilder);
builder->parent = NULL;
builder->offset = 0;
builder->has_child = FALSE;
- builder->class = class;
+ builder->class = tclass;
builder->type = type ? g_variant_type_copy (type) : NULL;
builder->expected = NULL;
builder->trusted = TRUE;
builder->expected2 = FALSE;
- switch (class)
+ switch (tclass)
{
case G_VARIANT_TYPE_CLASS_VARIANT:
builder->children_allocated = 1;
@@ -1360,7 +1360,7 @@ g_variant_builder_check_end (GVariantBuilder *builder,
/**
* g_variant_builder_check_add:
* @builder: a #GVariantBuilder
- * @class: a #GVariantTypeClass
+ * @tclass: a #GVariantTypeClass
* @type: a #GVariantType, or %NULL
* @error: a #GError
* @returns: %TRUE if adding is safe
@@ -1372,32 +1372,32 @@ g_variant_builder_check_end (GVariantBuilder *builder,
* g_variant_builder_open() has been used on @builder and
* g_variant_builder_close() has not yet been called).
*
- * It is an error to call this function with an invalid @class
+ * It is an error to call this function with an invalid @tclass
* (including %G_VARIANT_TYPE_CLASS_INVALID) or a class that's not the
* smallest class for some concrete type (for example,
* %G_VARIANT_TYPE_CLASS_ALL).
*
* If @type is non-%NULL this function first checks that it is a
- * member of @class (except, as with g_variant_builder_new(), if
- * @class is %G_VARIANT_TYPE_CLASS_VARIANT then any @type is OK).
+ * member of @tclass (except, as with g_variant_builder_new(), if
+ * @tclass is %G_VARIANT_TYPE_CLASS_VARIANT then any @type is OK).
*
- * The function then checks if any child of class @class (and type
+ * The function then checks if any child of class @tclass (and type
* @type, if given) would be suitable for adding to the builder. If
* @type is non-%NULL and is non-concrete then all concrete types
* matching @type must be suitable for adding (ie: @type must be equal
* to or less general than the type expected by the builder).
*
* In the case of an array that already has at least one item in it,
- * this function performs an additional check to ensure that @class
+ * this function performs an additional check to ensure that @tclass
* and @type match the items already in the array. @type, if given,
* need not be concrete in order for this check to pass.
*
* Errors are flagged in the event that the builder contains too many
* items or the addition would cause a type error.
*
- * If @class is specified and is a container type and @type is not
+ * If @tclass is specified and is a container type and @type is not
* given then there is no guarantee that adding a value of that class
- * would not fail. Calling g_variant_builder_open() with that @class
+ * would not fail. Calling g_variant_builder_open() with that @tclass
* (and @type as %NULL) would succeed, though.
*
* In the case that any error is detected @error is set and %FALSE is
@@ -1405,37 +1405,37 @@ g_variant_builder_check_end (GVariantBuilder *builder,
**/
gboolean
g_variant_builder_check_add (GVariantBuilder *builder,
- GVariantTypeClass class,
+ GVariantTypeClass tclass,
const GVariantType *type,
GError **error)
{
g_return_val_if_fail (builder != NULL, FALSE);
g_return_val_if_fail (builder->has_child == FALSE, FALSE);
- g_return_val_if_fail (class != G_VARIANT_TYPE_CLASS_INVALID &&
- class != G_VARIANT_TYPE_CLASS_ALL &&
- class != G_VARIANT_TYPE_CLASS_BASIC, FALSE);
+ g_return_val_if_fail (tclass != G_VARIANT_TYPE_CLASS_INVALID &&
+ tclass != G_VARIANT_TYPE_CLASS_ALL &&
+ tclass != G_VARIANT_TYPE_CLASS_BASIC, FALSE);
- if (class == G_VARIANT_TYPE_CLASS_VARIANT)
+ if (tclass == G_VARIANT_TYPE_CLASS_VARIANT)
type = NULL;
/* basically, we need to check the following:
*
- * expected2 <= type <= class <= expected
+ * expected2 <= type <= tclass <= expected
*
* but since any combination of the types may be %NULL, we need
* explicit checks:
*
* type <= class
- * class <= expected
+ * tclass <= expected
* type <= expected
- * expected2 <= class
+ * expected2 <= tclass
* expected2 <= type
*
* (we already know expected2 <= expected)
*/
- /* type <= class */
- if (type && g_variant_type_get_class (type) != class)
+ /* type <= tclass */
+ if (type && g_variant_type_get_class (type) != tclass)
{
gchar *type_str;
@@ -1443,12 +1443,12 @@ g_variant_builder_check_add (GVariantBuilder *builder,
g_set_error (error, G_VARIANT_BUILDER_ERROR,
G_VARIANT_BUILDER_ERROR_TYPE,
"type '%s' is not in the correct class, expected '%c'",
- type_str, class);
+ type_str, tclass);
g_free (type_str);
return FALSE;
}
- /* class <= expected */
+ /* tclass <= expected */
if (builder->expected)
{
GVariantTypeClass expected_class;
@@ -1457,13 +1457,13 @@ g_variant_builder_check_add (GVariantBuilder *builder,
if (expected_class != G_VARIANT_TYPE_CLASS_ALL &&
(expected_class != G_VARIANT_TYPE_CLASS_BASIC ||
- !g_variant_type_class_is_basic (class)) &&
- expected_class != class)
+ !g_variant_type_class_is_basic (tclass)) &&
+ expected_class != tclass)
{
g_set_error (error, G_VARIANT_BUILDER_ERROR,
G_VARIANT_BUILDER_ERROR_TYPE,
"expecting value of class '%c', not '%c'",
- expected_class, class);
+ expected_class, tclass);
return FALSE;
}
}
@@ -1485,9 +1485,9 @@ g_variant_builder_check_add (GVariantBuilder *builder,
return FALSE;
}
- /* expected2 <= class && expected2 <= type */
+ /* expected2 <= tclass && expected2 <= type */
if (builder->expected2 &&
- ((!g_variant_type_is_in_class (builder->expected2, class)) ||
+ ((!g_variant_type_is_in_class (builder->expected2, tclass)) ||
(type && !g_variant_type_matches (builder->expected2, type))))
{
g_set_error (error, G_VARIANT_BUILDER_ERROR,
@@ -1531,7 +1531,7 @@ g_variant_builder_check_add (GVariantBuilder *builder,
}
else if (builder->offset == 0)
{
- if (!g_variant_type_class_is_basic (class))
+ if (!g_variant_type_class_is_basic (tclass))
{
g_set_error (error, G_VARIANT_BUILDER_ERROR,
G_VARIANT_BUILDER_ERROR_TYPE,
diff --git a/glib/gvarianttype.c b/glib/gvarianttype.c
index 7d7cf77..5e6b489 100644
--- a/glib/gvarianttype.c
+++ b/glib/gvarianttype.c
@@ -544,7 +544,7 @@ g_variant_type_matches (const GVariantType *type,
/**
* g_variant_type_is_in_class:
* @type: a #GVariantType
- * @class: a #GVariantTypeClass
+ * @tclass: a #GVariantTypeClass
* @returns: %TRUE if @type is in the given @class
*
* Determines if @type is contained within @class.
@@ -555,11 +555,11 @@ g_variant_type_matches (const GVariantType *type,
**/
gboolean
g_variant_type_is_in_class (const GVariantType *type,
- GVariantTypeClass class)
+ GVariantTypeClass tclass)
{
char first_char = *(const gchar *) type;
- switch (class)
+ switch (tclass)
{
case G_VARIANT_TYPE_CLASS_TUPLE:
return first_char == '(' || first_char == 'r';
@@ -574,7 +574,7 @@ g_variant_type_is_in_class (const GVariantType *type,
return TRUE;
default:
- return class == first_char;
+ return tclass == first_char;
}
}
@@ -613,7 +613,7 @@ g_variant_type_get_class (const GVariantType *type)
/**
* g_variant_type_class_is_container:
- * @class: a #GVariantTypeClass
+ * @tclass: a #GVariantTypeClass
* @returns: %TRUE if @class is a container class
*
* Determines if @class is a container class.
@@ -622,9 +622,9 @@ g_variant_type_get_class (const GVariantType *type)
* tuple, dict_entry and variant.
**/
gboolean
-g_variant_type_class_is_container (GVariantTypeClass class)
+g_variant_type_class_is_container (GVariantTypeClass tclass)
{
- switch (class)
+ switch (tclass)
{
case G_VARIANT_TYPE_CLASS_VARIANT:
case G_VARIANT_TYPE_CLASS_MAYBE:
@@ -640,7 +640,7 @@ g_variant_type_class_is_container (GVariantTypeClass class)
/**
* g_variant_type_class_is_basic:
- * @class: a #GVariantTypeClass
+ * @tclass: a #GVariantTypeClass
* @returns: %TRUE if @class is a basic class
*
* Determines if @class is a basic class.
@@ -651,9 +651,9 @@ g_variant_type_class_is_container (GVariantTypeClass class)
* considered to be basic.
**/
gboolean
-g_variant_type_class_is_basic (GVariantTypeClass class)
+g_variant_type_class_is_basic (GVariantTypeClass tclass)
{
- switch (class)
+ switch (tclass)
{
case G_VARIANT_TYPE_CLASS_BOOLEAN:
case G_VARIANT_TYPE_CLASS_BYTE:
diff --git a/glib/gvarianttype.h b/glib/gvarianttype.h
index 2945c3c..a9d168c 100644
--- a/glib/gvarianttype.h
+++ b/glib/gvarianttype.h
@@ -253,7 +253,7 @@ G_BEGIN_DECLS
/* type string checking */
gboolean g_variant_type_string_is_valid (const gchar *type_string);
-gboolean g_variant_type_string_scan (const gchar *type_string,
+gboolean g_variant_type_string_scan (const gchar *string,
const gchar *limit,
const gchar **endptr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]