Skip to content

add extern "C" wrapping to rbs.h when using C++#2855

Merged
soutaro merged 1 commit intoruby:masterfrom
froydnj:froydnj-cplusplus-extern-c
Mar 3, 2026
Merged

add extern "C" wrapping to rbs.h when using C++#2855
soutaro merged 1 commit intoruby:masterfrom
froydnj:froydnj-cplusplus-extern-c

Conversation

@froydnj
Copy link
Contributor

@froydnj froydnj commented Feb 19, 2026

For C++ clients of C libraries, it's nice if the library detects the need for extern "C" wrapping, so that the client doesn't have to continually add extern "C" blocks around the relevant #includes.

I opted to only add the wrapping around one header, rather than all the headers in the project; it seems unlikely that a client would need/want to include something other than rbs.h.

Copy link
Member

@soutaro soutaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@soutaro soutaro added this to the RBS 4.0 milestone Mar 3, 2026
@soutaro soutaro merged commit 3971030 into ruby:master Mar 3, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants