mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Unsafe[Mutable]Pointer.memory => .pointee
This commit is contained in:
committed by
Max Moiseev
parent
f1dbe205a3
commit
3d0ad16094
@@ -1339,7 +1339,7 @@ NSStringAPIs.test("smallestEncoding") {
|
||||
|
||||
func getHomeDir() -> String {
|
||||
#if os(OSX)
|
||||
return String.fromCString(getpwuid(getuid()).memory.pw_dir)!
|
||||
return String.fromCString(getpwuid(getuid()).pointee.pw_dir)!
|
||||
#elseif os(iOS) || os(tvOS) || os(watchOS)
|
||||
// getpwuid() returns null in sandboxed apps under iOS simulator.
|
||||
return NSHomeDirectory()
|
||||
|
||||
Reference in New Issue
Block a user