Use individual args instead of TSLength in input seek function
This commit is contained in:
parent
b3a6de6dad
commit
8e217f758c
5 changed files with 8 additions and 8 deletions
|
|
@ -19,10 +19,10 @@ const char *ts_string_input_read(void *payload, size_t *bytes_read) {
|
|||
return input->string + previous_position;
|
||||
}
|
||||
|
||||
int ts_string_input_seek(void *payload, TSLength position) {
|
||||
int ts_string_input_seek(void *payload, size_t character, size_t byte) {
|
||||
TSStringInput *input = (TSStringInput *)payload;
|
||||
input->position = position.bytes;
|
||||
return (position.bytes < input->length);
|
||||
input->position = byte;
|
||||
return (byte < input->length);
|
||||
}
|
||||
|
||||
TSInput ts_string_input_make(const char *string) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue