Skip to content

Commit

Permalink
fix doc of utf8 functions
Browse files Browse the repository at this point in the history
  • Loading branch information
martinfouilleul committed Oct 4, 2024
1 parent 62d64e6 commit d9d8a49
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions src/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -3769,6 +3769,61 @@
"kind": "u32"
}
},
{
"kind": "typename",
"name": "oc_utf8_status",
"doc": "This enum declares the possible return status of UTF8 decoding/encoding operations.",
"type": {
"kind": "enum",
"type": {
"kind": "u32"
},
"constants": [
{
"kind": "enum-constant",
"name": "OC_UTF8_OK",
"doc": "The operation was successful.",
"value": 0
},
{
"kind": "enum-constant",
"name": "OC_UTF8_OUT_OF_BOUNDS",
"doc": "The operation unexpectedly encountered the end of the utf8 sequence.",
"value": 1
},
{
"kind": "enum-constant",
"name": "OC_UTF8_UNEXPECTED_CONTINUATION_BYTE",
"doc": "A continuation byte was encountered where a leading byte was expected.",
"value": 3
},
{
"kind": "enum-constant",
"name": "OC_UTF8_UNEXPECTED_LEADING_BYTE",
"doc": "A leading byte was encountered in the middle of the encoding of utf8 codepoint.",
"value": 4
},
{
"kind": "enum-constant",
"name": "OC_UTF8_INVALID_BYTE",
"doc": "The utf8 sequence contains an invalid byte.",
"value": 5
},
{
"kind": "enum-constant",
"name": "OC_UTF8_INVALID_CODEPOINT",
"doc": "The operation encountered an invalid utf8 codepoint.",
"value": 6
},
{
"kind": "enum-constant",
"name": "OC_UTF8_OVERLONG_ENCODING",
"doc": "The utf8 sequence contains an overlong encoding of a utf8 codepoint.",
"value": 7
}
]
}
},
{
"kind": "proc",
"name": "oc_utf8_size_from_leading_char",
Expand Down Expand Up @@ -3902,6 +3957,14 @@
"type": {
"kind": "struct",
"fields": [
{
"name": "status",
"doc": "The status of the decoding operation. If not `OC_UTF8_OK`, it describes the error that was encountered during decoding.",
"type": {
"kind": "namedType",
"name": "oc_utf8_status"
}
},
{
"name": "codepoint",
"doc": "The decoded codepoint.",
Expand Down

0 comments on commit d9d8a49

Please sign in to comment.