diff --git a/lib/include/tree_sitter/api.h b/lib/include/tree_sitter/api.h index 04aed846..bd78c6e6 100644 --- a/lib/include/tree_sitter/api.h +++ b/lib/include/tree_sitter/api.h @@ -369,8 +369,8 @@ void ts_tree_edit(TSTree *self, const TSInputEdit *edit); * given `length` pointer. */ TSRange *ts_tree_get_changed_ranges( - const TSTree *self, const TSTree *old_tree, + const TSTree *self, uint32_t *length ); diff --git a/lib/src/tree.c b/lib/src/tree.c index 04cb1d24..e4148c2d 100644 --- a/lib/src/tree.c +++ b/lib/src/tree.c @@ -89,7 +89,7 @@ TSRange *ts_tree_get_changed_ranges(const TSTree *self, const TSTree *other, uin TreeCursor cursor2 = {NULL, array_new()}; TSNode root = ts_tree_root_node(self); ts_tree_cursor_init(&cursor1, root); - ts_tree_cursor_init(&cursor2, root); + ts_tree_cursor_init(&cursor2, root); // really other's root, but reinitialized later TSRangeArray included_range_differences = array_new(); ts_range_array_get_changed_ranges(