[glib] GVariant: Add g_variant_parse_error_quark()
- From: Ryan Lortie <desrt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] GVariant: Add g_variant_parse_error_quark()
- Date: Sun, 22 Dec 2013 16:27:42 +0000 (UTC)
commit eeac91f866939fd033303f34c7eb9d2b57c769fb
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Sep 17 11:10:28 2013 +0200
GVariant: Add g_variant_parse_error_quark()
Most GErrors, such as GSomethingError, have a function to get
their quark that looks like g_something_error_quark(),
so bindings (such as gtkmm) would expect GVariantParseError
to have g_variant_parse_error_quark(). Instead this had
g_variant_parser_get_error_quark().
This deprecates the old function and adds the correct one,
making life easier for gtkmm (and maybe others).
https://bugzilla.gnome.org/show_bug.cgi?id=708212
docs/reference/glib/glib-sections.txt | 1 +
glib/gvariant-parser.c | 11 ++++++++++-
glib/gvariant.h | 7 +++++--
3 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/docs/reference/glib/glib-sections.txt b/docs/reference/glib/glib-sections.txt
index cf67661..e8b6bfe 100644
--- a/docs/reference/glib/glib-sections.txt
+++ b/docs/reference/glib/glib-sections.txt
@@ -3232,6 +3232,7 @@ g_variant_new_parsed_va
g_variant_new_parsed
<SUBSECTION Private>
+g_variant_parse_error_quark
g_variant_parser_get_error_quark
g_variant_type_checked_
</SECTION>
diff --git a/glib/gvariant-parser.c b/glib/gvariant-parser.c
index de140d0..44bec57 100644
--- a/glib/gvariant-parser.c
+++ b/glib/gvariant-parser.c
@@ -71,7 +71,16 @@
*
* Error codes returned by parsing text-format GVariants.
**/
-G_DEFINE_QUARK (g-variant-parse-error-quark, g_variant_parser_get_error)
+G_DEFINE_QUARK (g-variant-parse-error-quark, g_variant_parse_error)
+
+/**
+ * Deprecated: Use g_variant_parse_error_quark() instead.
+ */
+GQuark
+g_variant_parser_get_error_quark (void)
+{
+ return g_variant_parse_error_quark ();
+}
typedef struct
{
diff --git a/glib/gvariant.h b/glib/gvariant.h
index dbace86..7baff89 100644
--- a/glib/gvariant.h
+++ b/glib/gvariant.h
@@ -323,12 +323,15 @@ typedef enum
G_VARIANT_PARSE_ERROR_UNTERMINATED_STRING_CONSTANT,
G_VARIANT_PARSE_ERROR_VALUE_EXPECTED
} GVariantParseError;
-#define G_VARIANT_PARSE_ERROR (g_variant_parser_get_error_quark ())
+#define G_VARIANT_PARSE_ERROR (g_variant_parse_error_quark ())
-GLIB_AVAILABLE_IN_ALL
+GLIB_DEPRECATED_IN_2_38_FOR(g_variant_parse_error_quark)
GQuark g_variant_parser_get_error_quark (void);
GLIB_AVAILABLE_IN_ALL
+GQuark g_variant_parse_error_quark (void);
+
+GLIB_AVAILABLE_IN_ALL
GVariantBuilder * g_variant_builder_new (const GVariantType *type);
GLIB_AVAILABLE_IN_ALL
void g_variant_builder_unref (GVariantBuilder *builder);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]