diff --git a/lib/include/tree_sitter/api.h b/lib/include/tree_sitter/api.h index 1cc6b3e9..5003cff7 100644 --- a/lib/include/tree_sitter/api.h +++ b/lib/include/tree_sitter/api.h @@ -1,7 +1,9 @@ #ifndef TREE_SITTER_API_H_ #define TREE_SITTER_API_H_ +#ifdef __GNUC__ #pragma GCC visibility push(default) +#endif #ifdef __cplusplus extern "C" { @@ -1165,6 +1167,8 @@ void ts_set_allocator( } #endif +#ifdef __GNUC__ #pragma GCC visibility pop +#endif #endif // TREE_SITTER_API_H_