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 <savoundg@amazon.com>
(cherry picked from commit 1da46327b3)
This commit is contained in:
Georges Savoundararadj 2026-05-27 21:06:36 +00:00 committed by Will Lillis
parent f4b1fe2ba7
commit 3ab78c3c5b

View file

@ -9,7 +9,7 @@ extern "C" {
#include <stdio.h>
#include <stdlib.h>
#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")))