apple / swift-system

Low-level system calls and types for Swift
Apache License 2.0
1.18k stars 102 forks source link

[1.3.x] Disfavor String.init(platformString: UnsafePointer<CChar>) #185

Closed glessard closed 4 months ago

glessard commented 4 months ago

This change disfavors String(platformString:) so that it is not ambiguous with String(cString:) when the initializer is specified without noting the label (i.e. in usages such as someUnsafePointer.map(String.init)

Cherry-picked from https://github.com/apple/swift-system/pull/161

Resolves rdar://127408859