Skip to content

Commit 9e70326

Browse files
committed
Remove round-trip bridging
1 parent eef0ed5 commit 9e70326

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Foundation/Stream.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ open class InputStream: Stream {
119119

120120
// reads up to length bytes into the supplied buffer, which must be at least of size len. Returns the actual number of bytes read.
121121
open func read(_ buffer: UnsafeMutablePointer<UInt8>, maxLength len: Int) -> Int {
122-
return CFReadStreamRead(_stream, buffer, CFIndex(truncating: len._bridgeToObjectiveC()))
122+
return CFReadStreamRead(_stream, buffer, len)
123123
}
124124

125125
// returns in O(1) a pointer to the buffer in 'buffer' and by reference in 'len' how many bytes are available. This buffer is only valid until the next stream operation. Subclassers may return NO for this if it is not appropriate for the stream type. This may return NO if the buffer is not available.

0 commit comments

Comments
 (0)