From 3ab78c3c5bd4da5b479743e70304ae8eebe94178 Mon Sep 17 00:00:00 2001 From: Georges Savoundararadj Date: Wed, 27 May 2026 21:06:36 +0000 Subject: [PATCH] fix(lib): use correct TREE_SITTER_HIDE_SYMBOLS macro name in alloc.h The alloc.h header checked for TREE_SITTER_HIDDEN_SYMBOLS, but the canonical macro name used everywhere else (api.h, render.rs, setup.py) is TREE_SITTER_HIDE_SYMBOLS. This mismatch meant that defining TREE_SITTER_HIDE_SYMBOLS (as the Python binding build does) would not actually hide the allocator symbols in alloc.h. Fixes tree-sitter/tree-sitter#5625 Signed-off-by: Georges Savoundararadj (cherry picked from commit 1da46327b3bde1271855789cd7a2c4bf7d06b758) --- lib/src/alloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/alloc.h b/lib/src/alloc.h index a27b8a633..3ea4cc96c 100644 --- a/lib/src/alloc.h +++ b/lib/src/alloc.h @@ -9,7 +9,7 @@ extern "C" { #include #include -#if defined(TREE_SITTER_HIDDEN_SYMBOLS) || defined(_WIN32) +#if defined(TREE_SITTER_HIDE_SYMBOLS) || defined(_WIN32) #define TS_PUBLIC #else #define TS_PUBLIC __attribute__((visibility("default")))