File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,18 +10,18 @@ internal protocol CSocketAddress {
1010internal extension CSocketAddress {
1111
1212 func withUnsafePointer< Result> (
13- _ body: ( UnsafePointer < CInterop . SocketAddress > , UInt32 ) throws -> Result
13+ _ body: ( UnsafePointer < CInterop . SocketAddress > , CInterop . SocketLength ) throws -> Result
1414 ) rethrows -> Result {
1515 return try Swift . withUnsafeBytes ( of: self ) {
16- return try body ( $0. baseAddress!. assumingMemoryBound ( to: CInterop . SocketAddress. self) , UInt32 ( MemoryLayout< Self> . size) )
16+ return try body ( $0. baseAddress!. assumingMemoryBound ( to: CInterop . SocketAddress. self) , CInterop . SocketLength ( MemoryLayout< Self> . size) )
1717 }
1818 }
1919
2020 mutating func withUnsafeMutablePointer< Result> (
21- _ body: ( UnsafeMutablePointer < CInterop . SocketAddress > , UInt32 ) throws -> Result
21+ _ body: ( UnsafeMutablePointer < CInterop . SocketAddress > , CInterop . SocketLength ) throws -> Result
2222 ) rethrows -> Result {
2323 return try Swift . withUnsafeMutableBytes ( of: & self ) {
24- return try body ( $0. baseAddress!. assumingMemoryBound ( to: CInterop . SocketAddress. self) , UInt32 ( MemoryLayout< Self> . size) )
24+ return try body ( $0. baseAddress!. assumingMemoryBound ( to: CInterop . SocketAddress. self) , CInterop . SocketLength ( MemoryLayout< Self> . size) )
2525 }
2626 }
2727}
You can’t perform that action at this time.
0 commit comments