Skip to content

Prefix @_cdecl functions with extern "C" in -Swift.h headers #38682

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 12, 2021

Conversation

bdash
Copy link
Contributor

@bdash bdash commented Jul 28, 2021

This ensures that the functions use the appropriate mangling if the header is imported and the functions are used from Objective-C++ code. Without this, users must place an extern "C" { … } block around the import of the generated header.

This ensures that the function uses the appropriate mangling if the header is imported and the function is used from Objective-C++ code.
@allevato
Copy link
Member

allevato commented Aug 2, 2021

@swift-ci please test

@allevato allevato requested a review from beccadax August 2, 2021 18:26
@bdash
Copy link
Contributor Author

bdash commented Aug 16, 2021

@beccadax Ping?

@bdash
Copy link
Contributor Author

bdash commented Nov 11, 2021

@beccadax Is there someone else that would be more appropriate to review this?

Copy link
Contributor

@beccadax beccadax left a comment

Choose a reason for hiding this comment

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

Sorry about the delay—this looks great!

@allevato
Copy link
Member

@swift-ci please test

@allevato allevato merged commit 7afb475 into swiftlang:main Nov 12, 2021
@bdash bdash deleted the cdecl-extern-C branch November 12, 2021 00:06
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.

3 participants