diff --git a/docs/reference/glib/glib-sections.txt b/docs/reference/glib/glib-sections.txt index 026fc3965..8f16358d8 100644 --- a/docs/reference/glib/glib-sections.txt +++ b/docs/reference/glib/glib-sections.txt @@ -2920,6 +2920,7 @@ g_variant_builder_open g_variant_builder_close +GVariantParseError G_VARIANT_PARSE_ERROR g_variant_parse g_variant_new_parsed_va diff --git a/glib/gvariant-parser.c b/glib/gvariant-parser.c index d237334f8..93a5dd372 100644 --- a/glib/gvariant-parser.c +++ b/glib/gvariant-parser.c @@ -39,6 +39,13 @@ * are not currently defined for this domain. See #GError for * information on error domains. **/ +/** + * GVariantParseError: + * @G_VARIANT_PARSE_ERROR_FAILED: generic error + * + * Error codes returned by parsing text-format GVariants. Currently the + * parser makes no distinction between different types of error. + **/ GQuark g_variant_parser_get_error_quark (void) { diff --git a/glib/gvariant.h b/glib/gvariant.h index 6647c4076..24d9f4029 100644 --- a/glib/gvariant.h +++ b/glib/gvariant.h @@ -180,7 +180,12 @@ struct _GVariantBuilder { gsize x[16]; }; +typedef enum +{ + G_VARIANT_PARSE_ERROR_FAILED +} GVariantParseError; #define G_VARIANT_PARSE_ERROR (g_variant_parser_get_error_quark ()) + GQuark g_variant_parser_get_error_quark (void); GVariantBuilder * g_variant_builder_new (const GVariantType *type);