Skip to content

Add HERB_EXPORTED_FUNCTION macro for symbol visibility control#933

Merged
marcoroth merged 2 commits into
mainfrom
HERB_EXPORT_SYMBOLS
Nov 30, 2025
Merged

Add HERB_EXPORTED_FUNCTION macro for symbol visibility control#933
marcoroth merged 2 commits into
mainfrom
HERB_EXPORT_SYMBOLS

Conversation

@marcoroth

@marcoroth marcoroth commented Nov 30, 2025

Copy link
Copy Markdown
Owner

Follow Prism's pattern for controlling symbol visibility when building shared libraries. The public API in herb.h/herb.c is marked with HERB_EXPORTED_FUNCTION, which exports symbols when HERB_EXPORT_SYMBOLS is defined.

For the Ruby extension, only Init_herb is exported, all other symbols (including prism's pm_* functions) remain hidden, to prevent future symbol conflicts with other libraries available on the system.

Follow up on #906

@pkg-pr-new

pkg-pr-new Bot commented Nov 30, 2025

Copy link
Copy Markdown
npx https://pkg.pr.new/@herb-tools/formatter@933
npx https://pkg.pr.new/@herb-tools/language-server@933
npx https://pkg.pr.new/@herb-tools/linter@933

commit: 869b7b2

@github-actions

github-actions Bot commented Nov 30, 2025

Copy link
Copy Markdown

🌿 Interactive Playground and Documentation Preview

A preview deployment has been built for this pull request. Try out the changes live in the interactive playground:


🌱 Grown from commit 869b7b2


✅ Preview deployment has been cleaned up.

@marcoroth marcoroth marked this pull request as ready for review November 30, 2025 05:36
@marcoroth marcoroth merged commit 40bafdc into main Nov 30, 2025
32 checks passed
@marcoroth marcoroth deleted the HERB_EXPORT_SYMBOLS branch November 30, 2025 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant