fix(lib): expose only symbols defined in api.h
This commit is contained in:
parent
cbe805d82a
commit
5e3df64a46
2 changed files with 5 additions and 1 deletions
2
Makefile
2
Makefile
|
|
@ -18,7 +18,7 @@ endif
|
|||
OBJ := $(SRC:.c=.o)
|
||||
|
||||
# define default flags, and override to append mandatory flags
|
||||
override CFLAGS := -O3 -std=gnu99 -fPIC -Wall -Wextra -Werror -Wshadow $(CFLAGS)
|
||||
override CFLAGS := -O3 -std=gnu99 -fPIC -fvisibility=hidden -Wall -Wextra -Werror -Wshadow $(CFLAGS)
|
||||
override CFLAGS += -Ilib/src -Ilib/include
|
||||
|
||||
# ABI versioning
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef TREE_SITTER_API_H_
|
||||
#define TREE_SITTER_API_H_
|
||||
|
||||
#pragma GCC visibility push(default)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
@ -1163,4 +1165,6 @@ void ts_set_allocator(
|
|||
}
|
||||
#endif
|
||||
|
||||
#pragma GCC visibility pop
|
||||
|
||||
#endif // TREE_SITTER_API_H_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue