Skip to content

[interop][SwiftToCxx] experimentally expose Swift::String type to C++ #60785

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 3 commits into from
Aug 26, 2022

Conversation

hyp
Copy link
Contributor

@hyp hyp commented Aug 25, 2022

The only stdlib member that's currently exposed is the default initializer, everything else is in extensions.

However, we also add a new generated operator NSString * for casting a Swift String value to NSString * on the C++ side.

@hyp hyp force-pushed the eng/string-to-nsstring branch from 88d45dc to 06d9fd2 Compare August 25, 2022 22:09
@hyp
Copy link
Contributor Author

hyp commented Aug 25, 2022

Also need to not expose unexposed members to avoid _stringGuts property in String itself.

@hyp hyp requested review from zoecarver and egorzhdan August 25, 2022 22:10
@hyp
Copy link
Contributor Author

hyp commented Aug 25, 2022

@swift-ci please test

@hyp
Copy link
Contributor Author

hyp commented Aug 25, 2022

@swift-ci please test source compatibility

@hyp hyp added the c++ interop Feature: Interoperability with C++ label Aug 25, 2022
@hyp hyp merged commit 000df95 into swiftlang:main Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ interop Feature: Interoperability with C++
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants