aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2022-11-15 16:54:41 +0200
committerEli Zaretskii2022-11-15 16:54:41 +0200
commitab70ab19be64902123b0e2c08191d5ebf70feb62 (patch)
tree94f14ad5a3ffa0acb6f38ed4f24ae235a8fcbb04 /src
parent8175497ccac1b3afc2208260be91423e2bca2d25 (diff)
downloademacs-ab70ab19be64902123b0e2c08191d5ebf70feb62.tar.gz
emacs-ab70ab19be64902123b0e2c08191d5ebf70feb62.zip
Fix the MS-Windows build due to use of a new TS function
* src/treesit.c (ts_tree_get_changed_ranges) [WINDOWSNT]: Define, load from the library, and call through a function pointer.
Diffstat (limited to 'src')
-rw-r--r--src/treesit.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/treesit.c b/src/treesit.c
index 858148b8496..a59b8e2735b 100644
--- a/src/treesit.c
+++ b/src/treesit.c
@@ -42,7 +42,6 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
42#undef ts_node_field_name_for_child 42#undef ts_node_field_name_for_child
43#undef ts_node_first_child_for_byte 43#undef ts_node_first_child_for_byte
44#undef ts_node_first_named_child_for_byte 44#undef ts_node_first_named_child_for_byte
45#undef ts_node_has_changes
46#undef ts_node_has_error 45#undef ts_node_has_error
47#undef ts_node_is_extra 46#undef ts_node_is_extra
48#undef ts_node_is_missing 47#undef ts_node_is_missing
@@ -84,6 +83,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
84#undef ts_tree_cursor_new 83#undef ts_tree_cursor_new
85#undef ts_tree_delete 84#undef ts_tree_delete
86#undef ts_tree_edit 85#undef ts_tree_edit
86#undef ts_tree_get_changed_ranges
87#undef ts_tree_root_node 87#undef ts_tree_root_node
88 88
89DEF_DLL_FN (uint32_t, ts_language_version, (const TSLanguage *)); 89DEF_DLL_FN (uint32_t, ts_language_version, (const TSLanguage *));
@@ -98,7 +98,6 @@ DEF_DLL_FN (bool, ts_node_eq, (TSNode, TSNode));
98DEF_DLL_FN (const char *, ts_node_field_name_for_child, (TSNode, uint32_t)); 98DEF_DLL_FN (const char *, ts_node_field_name_for_child, (TSNode, uint32_t));
99DEF_DLL_FN (TSNode, ts_node_first_child_for_byte, (TSNode, uint32_t)); 99DEF_DLL_FN (TSNode, ts_node_first_child_for_byte, (TSNode, uint32_t));
100DEF_DLL_FN (TSNode, ts_node_first_named_child_for_byte, (TSNode, uint32_t)); 100DEF_DLL_FN (TSNode, ts_node_first_named_child_for_byte, (TSNode, uint32_t));
101DEF_DLL_FN (bool, ts_node_has_changes, (TSNode));
102DEF_DLL_FN (bool, ts_node_has_error, (TSNode)); 101DEF_DLL_FN (bool, ts_node_has_error, (TSNode));
103DEF_DLL_FN (bool, ts_node_is_extra, (TSNode)); 102DEF_DLL_FN (bool, ts_node_is_extra, (TSNode));
104DEF_DLL_FN (bool, ts_node_is_missing, (TSNode)); 103DEF_DLL_FN (bool, ts_node_is_missing, (TSNode));
@@ -151,6 +150,8 @@ DEF_DLL_FN (bool, ts_tree_cursor_goto_parent, (TSTreeCursor *));
151DEF_DLL_FN (TSTreeCursor, ts_tree_cursor_new, (TSNode)); 150DEF_DLL_FN (TSTreeCursor, ts_tree_cursor_new, (TSNode));
152DEF_DLL_FN (void, ts_tree_delete, (TSTree *)); 151DEF_DLL_FN (void, ts_tree_delete, (TSTree *));
153DEF_DLL_FN (void, ts_tree_edit, (TSTree *, const TSInputEdit *)); 152DEF_DLL_FN (void, ts_tree_edit, (TSTree *, const TSInputEdit *));
153DEF_DLL_FN (TSRange *, ts_tree_get_changed_ranges,
154 (const TSTree *, const TSTree *, uint32_t *));
154DEF_DLL_FN (TSNode, ts_tree_root_node, (const TSTree *)); 155DEF_DLL_FN (TSNode, ts_tree_root_node, (const TSTree *));
155 156
156static bool 157static bool
@@ -171,7 +172,6 @@ init_treesit_functions (void)
171 LOAD_DLL_FN (library, ts_node_field_name_for_child); 172 LOAD_DLL_FN (library, ts_node_field_name_for_child);
172 LOAD_DLL_FN (library, ts_node_first_child_for_byte); 173 LOAD_DLL_FN (library, ts_node_first_child_for_byte);
173 LOAD_DLL_FN (library, ts_node_first_named_child_for_byte); 174 LOAD_DLL_FN (library, ts_node_first_named_child_for_byte);
174 LOAD_DLL_FN (library, ts_node_has_changes);
175 LOAD_DLL_FN (library, ts_node_has_error); 175 LOAD_DLL_FN (library, ts_node_has_error);
176 LOAD_DLL_FN (library, ts_node_is_extra); 176 LOAD_DLL_FN (library, ts_node_is_extra);
177 LOAD_DLL_FN (library, ts_node_is_missing); 177 LOAD_DLL_FN (library, ts_node_is_missing);
@@ -213,6 +213,7 @@ init_treesit_functions (void)
213 LOAD_DLL_FN (library, ts_tree_cursor_new); 213 LOAD_DLL_FN (library, ts_tree_cursor_new);
214 LOAD_DLL_FN (library, ts_tree_delete); 214 LOAD_DLL_FN (library, ts_tree_delete);
215 LOAD_DLL_FN (library, ts_tree_edit); 215 LOAD_DLL_FN (library, ts_tree_edit);
216 LOAD_DLL_FN (library, ts_tree_get_changed_ranges);
216 LOAD_DLL_FN (library, ts_tree_root_node); 217 LOAD_DLL_FN (library, ts_tree_root_node);
217 218
218 return true; 219 return true;
@@ -228,7 +229,6 @@ init_treesit_functions (void)
228#define ts_node_field_name_for_child fn_ts_node_field_name_for_child 229#define ts_node_field_name_for_child fn_ts_node_field_name_for_child
229#define ts_node_first_child_for_byte fn_ts_node_first_child_for_byte 230#define ts_node_first_child_for_byte fn_ts_node_first_child_for_byte
230#define ts_node_first_named_child_for_byte fn_ts_node_first_named_child_for_byte 231#define ts_node_first_named_child_for_byte fn_ts_node_first_named_child_for_byte
231#define ts_node_has_changes fn_ts_node_has_changes
232#define ts_node_has_error fn_ts_node_has_error 232#define ts_node_has_error fn_ts_node_has_error
233#define ts_node_is_extra fn_ts_node_is_extra 233#define ts_node_is_extra fn_ts_node_is_extra
234#define ts_node_is_missing fn_ts_node_is_missing 234#define ts_node_is_missing fn_ts_node_is_missing
@@ -270,6 +270,7 @@ init_treesit_functions (void)
270#define ts_tree_cursor_new fn_ts_tree_cursor_new 270#define ts_tree_cursor_new fn_ts_tree_cursor_new
271#define ts_tree_delete fn_ts_tree_delete 271#define ts_tree_delete fn_ts_tree_delete
272#define ts_tree_edit fn_ts_tree_edit 272#define ts_tree_edit fn_ts_tree_edit
273#define ts_tree_get_changed_ranges fn_ts_tree_get_changed_ranges
273#define ts_tree_root_node fn_ts_tree_root_node 274#define ts_tree_root_node fn_ts_tree_root_node
274 275
275#endif /* WINDOWSNT */ 276#endif /* WINDOWSNT */