Skip to content

Commit 64a024f

Browse files
author
sabkrish
committed
Documentation changes
Changed dispatch_data_t to DispatchData Changed dispatch_io_t to DispatchIO Changed dispatch_source_set_timer to DispatchSourceTimer
1 parent f71f3f9 commit 64a024f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
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 `NSData` 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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ fileprivate extension URLSession._MultiHandle {
351351
case .milliseconds(let milliseconds):
352352
if (timeoutSource == nil) || timeoutSource!.milliseconds != milliseconds {
353353
//TODO: Could simply change the existing timer by calling
354-
// dispatch_source_set_timer() again.
354+
// DispatchSourceTimer() again.
355355
let block = DispatchWorkItem { [weak self] in
356356
self?.timeoutTimerFired()
357357
}

0 commit comments

Comments
 (0)