X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gio%2Fgsettingsschema.c;h=a7e0838b1edc6596d5f9e66ad2ecd6a48cfe0bd6;hb=7103484017ff000d01ed94567539d37fa09b32b2;hp=fb8a64aecdde43e050436b73bcb3ae4511045222;hpb=0cc20b7e0b8376a1b7c14a1a712d1f22a8c0eac0;p=platform%2Fupstream%2Fglib.git
diff --git a/gio/gsettingsschema.c b/gio/gsettingsschema.c
index fb8a64a..a7e0838 100644
--- a/gio/gsettingsschema.c
+++ b/gio/gsettingsschema.c
@@ -251,8 +251,7 @@ g_settings_schema_source_unref (GSettingsSchemaSource *source)
* may be useful to authors of plugin management systems.
*
* The directory should contain a file called `gschemas.compiled` as
- * produced by the
- * glib-compile-schemas tool.
+ * produced by the [glib-compile-schemas][glib-compile-schemas] tool.
*
* If @trusted is %TRUE then `gschemas.compiled` is trusted not to be
* corrupted. This assumption has a performance advantage, but can result
@@ -267,8 +266,8 @@ g_settings_schema_source_unref (GSettingsSchemaSource *source)
* source, the lookup will recurse to the parent.
*
* Second, any references to other schemas specified within this
- * source (ie: child or extends)
- * references may be resolved from the @parent.
+ * source (ie: `child` or `extends`) references may be resolved
+ * from the @parent.
*
* For this second reason, except in very unusual situations, the
* @parent should probably be given as the default schema source, as
@@ -395,7 +394,7 @@ g_settings_schema_source_get_default (void)
*
* If the schema isn't found, %NULL is returned.
*
- * Returns: (transfer full): a new #GSettingsSchema
+ * Returns: (nullable) (transfer full): a new #GSettingsSchema
*
* Since: 2.32
**/
@@ -674,8 +673,9 @@ parse_into_text_tables (const gchar *directory,
GMarkupParseContext *context;
context = g_markup_parse_context_new (&parser, G_MARKUP_TREAT_CDATA_AS_TEXT, &info, NULL);
+ /* Ignore errors here, this is best effort only. */
if (g_markup_parse_context_parse (context, contents, size, NULL))
- g_markup_parse_context_end_parse (context, NULL);
+ (void) g_markup_parse_context_end_parse (context, NULL);
g_markup_parse_context_free (context);
/* Clean up dangling stuff in case there was an error. */
@@ -698,6 +698,8 @@ parse_into_text_tables (const gchar *directory,
g_free (filename);
}
+
+ g_dir_close (dir);
}
static GHashTable **
@@ -724,9 +726,10 @@ g_settings_schema_source_get_text_tables (GSettingsSchemaSource *source)
* g_settings_schema_source_list_schemas:
* @source: a #GSettingsSchemaSource
* @recursive: if we should recurse
- * @non_relocatable: (out) (transfer full): the list of non-relocatable
- * schemas
- * @relocatable: (out) (transfer full): the list of relocatable schemas
+ * @non_relocatable: (out) (transfer full) (array zero-terminated=1): the
+ * list of non-relocatable schemas
+ * @relocatable: (out) (transfer full) (array zero-terminated=1): the list
+ * of relocatable schemas
*
* Lists the schemas in a given source.
*
@@ -1592,31 +1595,28 @@ g_settings_schema_key_get_default_value (GSettingsSchemaKey *key)
* This function will return a #GVariant that fully describes the range
* of values that are valid for @key.
*
- * The type of #GVariant returned is (sv). The
- * string describes the type of range restriction in effect. The type
- * and meaning of the value contained in the variant depends on the
- * string.
+ * The type of #GVariant returned is `(sv)`. The string describes
+ * the type of range restriction in effect. The type and meaning of
+ * the value contained in the variant depends on the string.
*
- * If the string is 'type' then the variant contains
- * an empty array. The element type of that empty array is the expected
- * type of value and all values of that type are valid.
+ * If the string is `'type'` then the variant contains an empty array.
+ * The element type of that empty array is the expected type of value
+ * and all values of that type are valid.
*
- * If the string is 'enum' then the variant contains
- * an array enumerating the possible values. Each item in the array is
+ * If the string is `'enum'` then the variant contains an array
+ * enumerating the possible values. Each item in the array is
* a possible valid value and no other values are valid.
*
- * If the string is 'flags' then the variant contains
- * an array. Each item in the array is a value that may appear zero or
- * one times in an array to be used as the value for this key. For
- * example, if the variant contained the array ['x',
- * 'y'] then the valid values for the key would be
- * [], ['x'],
- * ['y'], ['x', 'y'] and
- * ['y', 'x'].
- *
- * Finally, if the string is 'range' then the variant
- * contains a pair of like-typed values -- the minimum and maximum
- * permissible values for this key.
+ * If the string is `'flags'` then the variant contains an array. Each
+ * item in the array is a value that may appear zero or one times in an
+ * array to be used as the value for this key. For example, if the
+ * variant contained the array `['x', 'y']` then the valid values for
+ * the key would be `[]`, `['x']`, `['y']`, `['x', 'y']` and
+ * `['y', 'x']`.
+ *
+ * Finally, if the string is `'range'` then the variant contains a pair
+ * of like-typed values -- the minimum and maximum permissible values
+ * for this key.
*
* This information should not be used by normal programs. It is
* considered to be a hint for introspection purposes. Normal programs