Skip to content

Commit 5c00222

Browse files
authored
Merge pull request swiftlang#1311 from sabkrish/docs_update
2 parents f71f3f9 + a543a9b commit 5c00222

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

Foundation/URLSession/http/HTTPBodySource.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,21 @@ import CoreFoundation
2020
import Dispatch
2121

2222

23-
/// Turn `NSData` into `dispatch_data_t`
23+
/// Turn `Data` into `DispatchData`
2424
internal func createDispatchData(_ data: Data) -> DispatchData {
2525
//TODO: Avoid copying data
2626
let buffer = UnsafeRawBufferPointer(start: data._backing.bytes,
2727
count: data.count)
2828
return DispatchData(bytes: buffer)
2929
}
3030

31-
/// Copy data from `dispatch_data_t` into memory pointed to by an `UnsafeMutableBufferPointer`.
31+
/// Copy data from `DispatchData` into memory pointed to by an `UnsafeMutableBufferPointer`.
3232
internal func copyDispatchData<T>(_ data: DispatchData, infoBuffer buffer: UnsafeMutableBufferPointer<T>) {
3333
precondition(data.count <= (buffer.count * MemoryLayout<T>.size))
3434
_ = data.copyBytes(to: buffer)
3535
}
3636

37-
/// Split `dispatch_data_t` into `(head, tail)` pair.
37+
/// Split `DispatchData` into `(head, tail)` pair.
3838
internal func splitData(dispatchData data: DispatchData, atPosition position: Int) -> (DispatchData,DispatchData) {
3939
return (data.subdata(in: 0..<position), data.subdata(in: position..<data.count))
4040
}
@@ -57,7 +57,7 @@ internal enum _HTTPBodySourceDataChunk {
5757
case error
5858
}
5959

60-
/// A HTTP body data source backed by `dispatch_data_t`.
60+
/// A HTTP body data source backed by `DispatchData`.
6161
internal final class _HTTPBodyDataSource {
6262
var data: DispatchData!
6363
init(data: DispatchData) {
@@ -91,7 +91,7 @@ extension _HTTPBodyDataSource : _HTTPBodySource {
9191
///
9292
/// This allows non-blocking streaming of file data to the remote server.
9393
///
94-
/// The source reads data using a `dispatch_io_t` channel, and hence reading
94+
/// The source reads data using a `DispatchIO` channel, and hence reading
9595
/// file data is non-blocking. It has a local buffer that it fills as calls
9696
/// to `getNextChunk(withLength:)` drain it.
9797
///

Foundation/URLSession/http/MultiHandle.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,7 @@ fileprivate extension URLSession._MultiHandle {
350350
timeoutTimerFired()
351351
case .milliseconds(let milliseconds):
352352
if (timeoutSource == nil) || timeoutSource!.milliseconds != milliseconds {
353-
//TODO: Could simply change the existing timer by calling
354-
// dispatch_source_set_timer() again.
353+
//TODO: Could simply change the existing timer by using DispatchSourceTimer again.
355354
let block = DispatchWorkItem { [weak self] in
356355
self?.timeoutTimerFired()
357356
}

0 commit comments

Comments
 (0)