1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-31 06:50:06 +03:00

encoding: Rework error codes

Use an enum instead of magic numbers. Fix a few error codes. Simplify
handling of "space" and "partial" errors.

See #506.
This commit is contained in:
Nick Wellnhofer 2023-02-22 17:11:20 +01:00
parent b463b38bcd
commit 3ff6abbf58
2 changed files with 192 additions and 376 deletions

File diff suppressed because it is too large Load Diff

View File

@ -32,6 +32,15 @@
extern "C" {
#endif
typedef enum {
XML_ENC_ERR_SUCCESS = 0,
XML_ENC_ERR_SPACE = -1,
XML_ENC_ERR_INPUT = -2,
XML_ENC_ERR_PARTIAL = -3,
XML_ENC_ERR_INTERNAL = -4,
XML_ENC_ERR_MEMORY = -5
} xmlCharEncError;
/*
* xmlCharEncoding:
*