forked from tree-sitter/java-tree-sitter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTreeSitter_java.patch
More file actions
17 lines (14 loc) · 842 Bytes
/
Copy pathTreeSitter_java.patch
File metadata and controls
17 lines (14 loc) · 842 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--- a/generated-sources/jextract/io/github/treesitter/jtreesitter/internal/TreeSitter.java
+++ b/generated-sources/jextract/io/github/treesitter/jtreesitter/internal/TreeSitter.java
@@ -20,9 +20,11 @@ public class TreeSitter extends TreeSitter$shared {
static final Arena LIBRARY_ARENA = Arena.ofAuto();
- static final SymbolLookup SYMBOL_LOOKUP = SymbolLookup.libraryLookup(System.mapLibraryName("tree-sitter"), LIBRARY_ARENA)
- .or(SymbolLookup.loaderLookup())
- .or(Linker.nativeLinker().defaultLookup());
+ static final SymbolLookup SYMBOL_LOOKUP = ChainedLibraryLookup.INSTANCE.get(LIBRARY_ARENA);
+
+ static {
+ ts_set_allocator(malloc$address(), calloc$address(), realloc$address(), free$address());
+ }
private static final int TREE_SITTER_LANGUAGE_VERSION = (int)15L;
/**