python3Packages.tree-sitter: remove unneded patch for tests

This commit is contained in:
Gutyina Gergő
2025-08-28 10:13:22 +02:00
parent ff4b51cb26
commit 44da303307
2 changed files with 0 additions and 19 deletions
@@ -1,6 +1,5 @@
{
lib,
stdenv,
buildPythonPackage,
fetchPypi,
@@ -18,11 +17,6 @@ buildPythonPackage rec {
hash = "sha256-zXYa0OTR/IiksbgIO64G1PlzrPb18pu/E+qWCcHeycE=";
};
# see https://github.com/tree-sitter/py-tree-sitter/issues/330#issuecomment-2629403946
patches = lib.optionals (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux) [
./segfault-patch.diff
];
build-system = [ setuptools ];
pythonImportsCheck = [ "tree_sitter" ];
@@ -1,13 +0,0 @@
--- i/tree_sitter/core/lib/src/parser.c
+++ w/tree_sitter/core/lib/src/parser.c
@@ -2084,6 +2084,10 @@ void ts_parser_reset(TSParser *self) {
self->parse_state = (TSParseState) {0};
}
+// FIXME: see tree-sitter/py-tree-sitter#330
+#if __GNUC__ >= 14 && defined(__aarch64__) && defined(__OPTIMIZE__) && !defined(__OPTIMIZE_SIZE__)
+__attribute__((optimize(2)))
+#endif
TSTree *ts_parser_parse(
TSParser *self,
const TSTree *old_tree,