1+ --- a/src/treesit.c
2+ +++ b/src/treesit.c
3+ @@ -34,7 +34,7 @@ along with GNU Emacs. If not, see <https://www.gnu.or
4+ # include "w32common.h"
5+
6+ /* In alphabetical order. */
7+ - #undef ts_language_version
8+ + #undef ts_language_abi_version
9+ #undef ts_node_child
10+ #undef ts_node_child_by_field_name
11+ #undef ts_node_child_count
12+ @@ -89,7 +89,7 @@ along with GNU Emacs. If not, see <https://www.gnu.or
13+ #undef ts_tree_get_changed_ranges
14+ #undef ts_tree_root_node
15+
16+ - DEF_DLL_FN (uint32_t, ts_language_version, (const TSLanguage *));
17+ + DEF_DLL_FN (uint32_t, ts_language_abi_version, (const TSLanguage *));
18+ DEF_DLL_FN (TSNode, ts_node_child, (TSNode, uint32_t));
19+ DEF_DLL_FN (TSNode, ts_node_child_by_field_name,
20+ (TSNode, const char *, uint32_t));
21+ @@ -166,7 +166,7 @@ init_treesit_functions (void)
22+ if (!library)
23+ return false;
24+
25+ - LOAD_DLL_FN (library, ts_language_version);
26+ + LOAD_DLL_FN (library, ts_language_abi_version);
27+ LOAD_DLL_FN (library, ts_node_child);
28+ LOAD_DLL_FN (library, ts_node_child_by_field_name);
29+ LOAD_DLL_FN (library, ts_node_child_count);
30+ @@ -224,7 +224,7 @@ init_treesit_functions (void)
31+ return true;
32+ }
33+
34+ - #define ts_language_version fn_ts_language_version
35+ + #define ts_language_abi_version fn_ts_language_abi_version
36+ #define ts_node_child fn_ts_node_child
37+ #define ts_node_child_by_field_name fn_ts_node_child_by_field_name
38+ #define ts_node_child_count fn_ts_node_child_count
39+ @@ -746,7 +746,7 @@ treesit_load_language (Lisp_Object language_symbol,
40+ {
41+ *signal_symbol = Qtreesit_load_language_error;
42+ *signal_data = list2 (Qversion_mismatch,
43+ - make_fixnum (ts_language_version (lang)));
44+ + make_fixnum (ts_language_abi_version (lang)));
45+ return NULL;
46+ }
47+ return lang;
48+ @@ -817,7 +817,7 @@ Return nil if a grammar library for LANGUAGE is not av
49+ &signal_data);
50+ if (ts_language == NULL)
51+ return Qnil;
52+ - uint32_t version = ts_language_version (ts_language);
53+ + uint32_t version = ts_language_abi_version (ts_language);
54+ return make_fixnum((ptrdiff_t) version);
55+ }
56+ }
0 commit comments