Skip to content

Commit 97d5857

Browse files
author
tron
committed
emacs29: Fix build with version 0.26.x of "tree-sitter" package
1 parent c1b6080 commit 97d5857

2 files changed

Lines changed: 62 additions & 1 deletion

File tree

editors/emacs29/distinfo

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
$NetBSD: distinfo,v 1.4 2024/06/24 00:36:23 gdt Exp $
1+
$NetBSD: distinfo,v 1.5 2025/12/22 19:51:06 tron Exp $
22

33
BLAKE2s (emacs-29.4.tar.xz) = dfe3ab5088f59a4c153aaf5e18920d4c81beffdd678d4fa4116abbe49ed41e2f
44
SHA512 (emacs-29.4.tar.xz) = 66b38081cb01d2c46ff7beefb45986cc225b4c922c30712ad0d456c6cae5507176ed99418c8f26948c5375c8afde4e4b2507d23ed997dbb5392d12150a121d80
55
Size (emacs-29.4.tar.xz) = 52210344 bytes
66
SHA1 (patch-Makefile.in) = cb43792c8996c781f382ae102ea771af8f3d3190
7+
SHA1 (patch-src_treesit.c) = f58370000074137997b8119ab55f49f2964010bb
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
$NetBSD: patch-src_treesit.c,v 1.1 2025/12/22 19:51:06 tron Exp $
2+
3+
Fix build with version 0.26.x of "tree-sitter".
4+
5+
--- src/treesit.c.orig 2024-06-21 14:10:07.000000000 +0100
6+
+++ src/treesit.c 2025-12-22 19:31:18.581988953 +0000
7+
@@ -34,7 +34,7 @@
8+
# include "w32common.h"
9+
10+
/* In alphabetical order. */
11+
-#undef ts_language_version
12+
+#undef ts_language_abi_version
13+
#undef ts_node_child
14+
#undef ts_node_child_by_field_name
15+
#undef ts_node_child_count
16+
@@ -89,7 +89,7 @@
17+
#undef ts_tree_get_changed_ranges
18+
#undef ts_tree_root_node
19+
20+
-DEF_DLL_FN (uint32_t, ts_language_version, (const TSLanguage *));
21+
+DEF_DLL_FN (uint32_t, ts_language_abi_version, (const TSLanguage *));
22+
DEF_DLL_FN (TSNode, ts_node_child, (TSNode, uint32_t));
23+
DEF_DLL_FN (TSNode, ts_node_child_by_field_name,
24+
(TSNode, const char *, uint32_t));
25+
@@ -166,7 +166,7 @@
26+
if (!library)
27+
return false;
28+
29+
- LOAD_DLL_FN (library, ts_language_version);
30+
+ LOAD_DLL_FN (library, ts_language_abi_version);
31+
LOAD_DLL_FN (library, ts_node_child);
32+
LOAD_DLL_FN (library, ts_node_child_by_field_name);
33+
LOAD_DLL_FN (library, ts_node_child_count);
34+
@@ -224,7 +224,7 @@
35+
return true;
36+
}
37+
38+
-#define ts_language_version fn_ts_language_version
39+
+#define ts_language_abi_version fn_ts_language_abi_version
40+
#define ts_node_child fn_ts_node_child
41+
#define ts_node_child_by_field_name fn_ts_node_child_by_field_name
42+
#define ts_node_child_count fn_ts_node_child_count
43+
@@ -664,7 +664,7 @@
44+
{
45+
*signal_symbol = Qtreesit_load_language_error;
46+
*signal_data = list2 (Qversion_mismatch,
47+
- make_fixnum (ts_language_version (lang)));
48+
+ make_fixnum (ts_language_abi_version (lang)));
49+
return NULL;
50+
}
51+
return lang;
52+
@@ -735,7 +735,7 @@
53+
&signal_data);
54+
if (ts_language == NULL)
55+
return Qnil;
56+
- uint32_t version = ts_language_version (ts_language);
57+
+ uint32_t version = ts_language_abi_version (ts_language);
58+
return make_fixnum((ptrdiff_t) version);
59+
}
60+
}

0 commit comments

Comments
 (0)