feat(c): rename DecodeFunction to TSDecodeFunction

Keep a typedef for backwards compatibility until ABI 16.
This commit is contained in:
ObserverOfTime 2025-08-23 10:18:15 +03:00 committed by Amaan Qureshi
parent dbe88f8bbb
commit b75196bb81
4 changed files with 11 additions and 8 deletions

View file

@ -38,15 +38,15 @@ typedef struct {
uint32_t *bytes_read
);
TSInputEncoding encoding;
DecodeFunction decode;
TSDecodeFunction decode;
} TSInput;
```
If you want to decode text that is not encoded in UTF-8 or UTF-16, you can set the `decode` field of the input to your function
that will decode text. The signature of the `DecodeFunction` is as follows:
that will decode text. The signature of the `TSDecodeFunction` is as follows:
```c
typedef uint32_t (*DecodeFunction)(
typedef uint32_t (*TSDecodeFunction)(
const uint8_t *string,
uint32_t length,
int32_t *code_point