summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
Diffstat (limited to 'pango')
-rw-r--r--pango/pango-attributes.h3
-rw-r--r--pango/pango-markup.c16
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;
}
/**