From 124ae30138ba5b42a29cb00f8604afcc9e8f801a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Linse?= Date: Fri, 25 Oct 2019 21:19:33 +0200 Subject: [PATCH] fix invalid docs for ts_tree_get_changed_ranges --- lib/include/tree_sitter/api.h | 2 +- lib/src/tree.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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(