-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Backporting std::string init for UnsafePointer? fixes to Swift 5.9 #65240
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
Conversation
Currently without an initializer for the unsafe char pointer type swiftc hits an assert around not being able to handle conversions of unsafe pointers with Any type. This patch adds the ability to convert to a std::string. This is to address issue swiftlang#61218 (cherry picked from commit 6180387)
This fixes a build failure that started occurring on CentOS after swiftlang#65057: ``` error: cannot find 'strlen' in scope ``` rdar://107987115 (cherry picked from commit 7774650)
@egorzhdan If there are no test failures in 5.9 I will leave the lit test as is, but for main I want to drop the name mangling part or replace it with a more robust regex. |
@hyp Sorry for the delay on the Explanation. Will post soon once I get a moment. |
|
@swift-ci please test |
@swift-ci please test macos platform |
Thanks Alex |
Backporting std::string init for UnsafePointer? fixes to Swift 5.9