mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
In Swift 4.2 the second parameter of UIApplicationMain exactly matches the type
of CommandLine.unsafeArgv so it can be called as below:
UIApplicationMain(CommandLine.argc, CommandLine.unsafeArgv, ...)
This is how it was intended to be in Swift 4 as well, but the types had
optionality differences, so callers instead had to do something like the below
example from the Firefox-iOS project:
let pointer = UnsafeMutableRawPointer(CommandLine.unsafeArgv).bindMemory(
to: UnsafeMutablePointer<Int8>.self, capacity: Int(CommandLine.argc))
UIApplicationMain(CommandLine.argc, pointer, ...)
This migration simply replaces the the second argument with
CommandLine.unsafeArgv if the first argument is CommandLine.argc.
There is an open issue for providing a deprecated version with the old type so
we simply leave as is any callers that don't pass argc for the first argument.
Resolves rdar://problem/40045693.
23 lines
638 B
JSON
23 lines
638 B
JSON
[
|
|
{
|
|
"DiffItemKind": "SpecialCaseDiffItem",
|
|
"Usr": "s:8MyAppKit17NSOpenGLSetOptionyyAA0D8GLOptionC_SitF",
|
|
"SpecialCaseId": "NSOpenGLSetOption"
|
|
},
|
|
{
|
|
"DiffItemKind": "SpecialCaseDiffItem",
|
|
"Usr": "s:8MyAppKit17NSOpenGLGetOptionyyAA0D8GLOptionC_SPySiGtF",
|
|
"SpecialCaseId": "NSOpenGLGetOption"
|
|
},
|
|
{
|
|
"DiffItemKind": "SpecialCaseDiffItem",
|
|
"Usr": "s:7MySwift0A6DoubleV3absyS2dFZ",
|
|
"SpecialCaseId": "StaticAbsToSwiftAbs"
|
|
},
|
|
{
|
|
"DiffItemKind": "SpecialCaseDiffItem",
|
|
"Usr": "s:8MyAppKit17UIApplicationMainys5Int32VAD_SpySpys4Int8VGGSSSgAItF",
|
|
"SpecialCaseId": "UIApplicationMain"
|
|
}
|
|
]
|