diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2012-12-14 13:01:46 -0500 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2012-12-14 13:03:57 -0500 |
commit | 7908fa27aaed4677536e011966b38c724532f116 (patch) | |
tree | a6bdf4466fbad218b584ca56f4621eeb3a2ceb2a | |
parent | 29020c71a21e3c666cf8bc92972d8c0ef46b9a9e (diff) | |
download | pango-7908fa27aaed4677536e011966b38c724532f116.tar.gz |
markup: Remove error from markup parser constructor
https://bugzilla.gnome.org/show_bug.cgi?id=679299
-rw-r--r-- | pango/pango-attributes.h | 3 | ||||
-rw-r--r-- | pango/pango-markup.c | 16 |
2 files changed, 10 insertions, 9 deletions
diff --git a/pango/pango-attributes.h b/pango/pango-attributes.h index 7cd80d8b..cbbaf961 100644 --- a/pango/pango-attributes.h +++ b/pango/pango-attributes.h @@ -293,8 +293,7 @@ gboolean pango_parse_markup (const char *markup_text, gunichar *accel_char, GError **error); -GMarkupParseContext * pango_markup_parser_new (gunichar accel_marker, - GError **error); +GMarkupParseContext * pango_markup_parser_new (gunichar accel_marker); gboolean pango_markup_parser_finish (GMarkupParseContext *context, PangoAttrList **attr_list, char **text, diff --git a/pango/pango-markup.c b/pango/pango-markup.c index 0f831855..a162f5bf 100644 --- a/pango/pango-markup.c +++ b/pango/pango-markup.c @@ -689,7 +689,6 @@ pango_parse_markup (const char *markup_text, /** * pango_markup_parser_new: * @accel_marker: character that precedes an accelerator, or 0 for none - * @error: address of return location for errors, or %NULL * * Parses marked-up text (see * <link linkend="PangoMarkupFormat">markup format</link>) to create @@ -703,9 +702,6 @@ pango_parse_markup (const char *markup_text, * when calling finish(). Two @accel_marker characters following each * other produce a single literal @accel_marker character. * - * If any error happens, none of the output arguments are touched except - * for @error. - * * To feed markup to the parser, use g_markup_parse_context_parse() * on the returned #GMarkupParseContext. When done with feeding markup * to the parser, use pango_markup_parser_finish() to get the data out @@ -721,10 +717,16 @@ pango_parse_markup (const char *markup_text, * Since: 1.31.0 **/ GMarkupParseContext * -pango_markup_parser_new (gunichar accel_marker, - GError **error) +pango_markup_parser_new (gunichar accel_marker) { - return pango_markup_parser_new_internal (accel_marker, error, TRUE); + GError *error = NULL; + GMarkupParseContext *context; + context = pango_markup_parser_new_internal (accel_marker, &error, TRUE); + + if (context == NULL) + g_critical ("Had error when making markup parser: %s\n", error->message); + + return context; } /** |