mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
14 lines
405 B
Swift
14 lines
405 B
Swift
import Foundation
|
|
@_exported import AppKit
|
|
|
|
// Fix the ARGV type of NSApplicationMain, which nonsensically takes
|
|
// argv as a const char**.
|
|
public func NSApplicationMain(
|
|
_ argc: Int32, _ argv: UnsafeMutablePointer<UnsafeMutablePointer<CChar>?>
|
|
) -> Int32 {
|
|
return argv.withMemoryRebound(to:UnsafePointer<Int8>.self, capacity: Int(argc)) {
|
|
argv in
|
|
return __NSApplicationMain(argc, argv)
|
|
}
|
|
}
|