[pango/serializer-rewrite: 17/18] Small fixes
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/serializer-rewrite: 17/18] Small fixes
- Date: Fri, 3 Dec 2021 00:54:01 +0000 (UTC)
commit 2c0aa8b8d3ac2811479976d6477166592b862458
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Dec 2 19:21:09 2021 -0500
Small fixes
Properly document deserialization errors, and
drop unused enum values.
pango/pango-layout.h | 10 +++-------
pango/serializer.c | 2 +-
2 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/pango/pango-layout.h b/pango/pango-layout.h
index 32dc16f0..7b3c6ca6 100644
--- a/pango/pango-layout.h
+++ b/pango/pango-layout.h
@@ -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;
diff --git a/pango/serializer.c b/pango/serializer.c
index ff7dd41f..a5c751fd 100644
--- a/pango/serializer.c
+++ b/pango/serializer.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]