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,
/**
* 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
* 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
* 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;
}
/**