Commit 2c0aa8b8 authored by Matthias Clasen's avatar Matthias Clasen
Browse files

Small fixes

Properly document deserialization errors, and
drop unused enum values.
parent ca7400bf
......@@ -382,20 +382,16 @@ gboolean pango_layout_write_to_file (PangoLayout
/**
* PangoLayoutDeserializeError:
* @PANGO_LAYOUT_SERIALIZE_INVALID: Unspecified error
* @PANGO_LAYOUT_SERIALIZE_INVALID_SYNTAX: The serialized data had
* the wrong structure (e.g. a member was expected to be a JSon object,
* but was an array)
* @PANGO_LAYOUT_SERIALIZE_INVALID_VALUE: A JSon value could not be
* @PANGO_LAYOUT_DESERIALIZE_INVALID: Unspecified error
* @PANGO_LAYOUT_DESERIALIZE_INVALID_VALUE: A JSon value could not be
* interpreted
* @PANGO_LAYOUT_SERIALIZE_MISSING_VALUE: A required JSon member was
* @PANGO_LAYOUT_DESERIALIZE_MISSING_VALUE: A required JSon member was
* not found
*
* Errors that can be returned by [func@Pango.Layout.deserialize].
*/
typedef enum {
PANGO_LAYOUT_DESERIALIZE_INVALID,
PANGO_LAYOUT_DESERIALIZE_INVALID_SYNTAX,
PANGO_LAYOUT_DESERIALIZE_INVALID_VALUE,
PANGO_LAYOUT_DESERIALIZE_MISSING_VALUE,
} PangoLayoutDeserializeError;
......
......@@ -708,7 +708,7 @@ attr_for_type (GtkJsonParser *parser,
case PANGO_ATTR_INVALID:
gtk_json_parser_set_error (parser,
g_error_new (PANGO_LAYOUT_DESERIALIZE_ERROR,
PANGO_LAYOUT_DESERIALIZE_INVALID_VALUE,
PANGO_LAYOUT_DESERIALIZE_MISSING_VALUE,
"Missing attribute type"));
return NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment