aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2026-02-18 14:25:24 +0200
committerEli Zaretskii2026-02-18 14:25:24 +0200
commit9df4dee8d5aff3ec4e55712f540225ac599b2960 (patch)
tree6e79906bbf642b03c772f165c7995b55f1a351da /src
parente915646b8944d8b611ab7094d9eb305ed162ff27 (diff)
downloademacs-9df4dee8d5aff3ec4e55712f540225ac599b2960.tar.gz
emacs-9df4dee8d5aff3ec4e55712f540225ac599b2960.zip
; Fix last change in treesit.c
* src/treesit.c (ts_tree_cursor_copy) [WINDOWSNT]: Define and load from the DLL if 'ts_tree_cursor_goto_previous_sibling' is not available. This fixes the MS-Windows build broken by the last change here. (Bug#80108)
Diffstat (limited to 'src')
-rw-r--r--src/treesit.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/treesit.c b/src/treesit.c
index c929bcaf4fe..8c38ba82e37 100644
--- a/src/treesit.c
+++ b/src/treesit.c
@@ -87,6 +87,8 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
87#undef ts_tree_cursor_goto_first_child_for_byte 87#undef ts_tree_cursor_goto_first_child_for_byte
88#ifdef HAVE_TS_TREE_CURSOR_GOTO_PREVIOUS_SIBLING 88#ifdef HAVE_TS_TREE_CURSOR_GOTO_PREVIOUS_SIBLING
89#undef ts_tree_cursor_goto_previous_sibling 89#undef ts_tree_cursor_goto_previous_sibling
90#else
91#undef ts_tree_cursor_copy
90#endif 92#endif
91#undef ts_tree_cursor_goto_next_sibling 93#undef ts_tree_cursor_goto_next_sibling
92#undef ts_tree_cursor_goto_parent 94#undef ts_tree_cursor_goto_parent
@@ -162,6 +164,8 @@ DEF_DLL_FN (int64_t, ts_tree_cursor_goto_first_child_for_byte, (TSTreeCursor *,
162DEF_DLL_FN (bool, ts_tree_cursor_goto_next_sibling, (TSTreeCursor *)); 164DEF_DLL_FN (bool, ts_tree_cursor_goto_next_sibling, (TSTreeCursor *));
163#ifdef HAVE_TS_TREE_CURSOR_GOTO_PREVIOUS_SIBLING 165#ifdef HAVE_TS_TREE_CURSOR_GOTO_PREVIOUS_SIBLING
164DEF_DLL_FN (bool, ts_tree_cursor_goto_previous_sibling, (TSTreeCursor *)); 166DEF_DLL_FN (bool, ts_tree_cursor_goto_previous_sibling, (TSTreeCursor *));
167#else
168DEF_DLL_FN (TSTreeCursor, ts_tree_cursor_copy, (const TSTreeCursor *));
165#endif 169#endif
166DEF_DLL_FN (bool, ts_tree_cursor_goto_parent, (TSTreeCursor *)); 170DEF_DLL_FN (bool, ts_tree_cursor_goto_parent, (TSTreeCursor *));
167DEF_DLL_FN (TSTreeCursor, ts_tree_cursor_new, (TSNode)); 171DEF_DLL_FN (TSTreeCursor, ts_tree_cursor_new, (TSNode));
@@ -232,6 +236,8 @@ init_treesit_functions (void)
232 LOAD_DLL_FN (library, ts_tree_cursor_goto_next_sibling); 236 LOAD_DLL_FN (library, ts_tree_cursor_goto_next_sibling);
233#ifdef HAVE_TS_TREE_CURSOR_GOTO_PREVIOUS_SIBLING 237#ifdef HAVE_TS_TREE_CURSOR_GOTO_PREVIOUS_SIBLING
234 LOAD_DLL_FN (library, ts_tree_cursor_goto_previous_sibling); 238 LOAD_DLL_FN (library, ts_tree_cursor_goto_previous_sibling);
239#else
240 LOAD_DLL_FN (library, ts_tree_cursor_copy);
235#endif 241#endif
236 LOAD_DLL_FN (library, ts_tree_cursor_goto_parent); 242 LOAD_DLL_FN (library, ts_tree_cursor_goto_parent);
237 LOAD_DLL_FN (library, ts_tree_cursor_new); 243 LOAD_DLL_FN (library, ts_tree_cursor_new);
@@ -294,7 +300,11 @@ init_treesit_functions (void)
294#define ts_tree_cursor_goto_first_child fn_ts_tree_cursor_goto_first_child 300#define ts_tree_cursor_goto_first_child fn_ts_tree_cursor_goto_first_child
295#define ts_tree_cursor_goto_first_child_for_byte fn_ts_tree_cursor_goto_first_child_for_byte 301#define ts_tree_cursor_goto_first_child_for_byte fn_ts_tree_cursor_goto_first_child_for_byte
296#define ts_tree_cursor_goto_next_sibling fn_ts_tree_cursor_goto_next_sibling 302#define ts_tree_cursor_goto_next_sibling fn_ts_tree_cursor_goto_next_sibling
303#ifdef HAVE_TS_TREE_CURSOR_GOTO_PREVIOUS_SIBLING
297#define ts_tree_cursor_goto_previous_sibling fn_ts_tree_cursor_goto_previous_sibling 304#define ts_tree_cursor_goto_previous_sibling fn_ts_tree_cursor_goto_previous_sibling
305#else
306#define ts_tree_cursor_copy fn_ts_tree_cursor_copy
307#endif
298#define ts_tree_cursor_goto_parent fn_ts_tree_cursor_goto_parent 308#define ts_tree_cursor_goto_parent fn_ts_tree_cursor_goto_parent
299#define ts_tree_cursor_new fn_ts_tree_cursor_new 309#define ts_tree_cursor_new fn_ts_tree_cursor_new
300#define ts_tree_delete fn_ts_tree_delete 310#define ts_tree_delete fn_ts_tree_delete