Skip to content

Commit 6215978

Browse files
committed
Queue: make the Swift overlay build again
This adjusts the construction of the `dispatch_autorelease_frequency_t` to explicitly add the `rawValue:` label and force unwrap the optional as identified by the compiler.
1 parent c482d3d commit 6215978

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/swift/Queue.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@ extension DispatchQueue {
9898
switch self {
9999
case .inherit:
100100
// DISPATCH_AUTORELEASE_FREQUENCY_INHERIT
101-
return CDispatch.dispatch_queue_attr_make_with_autorelease_frequency(attr, dispatch_autorelease_frequency_t(0))
101+
return CDispatch.dispatch_queue_attr_make_with_autorelease_frequency(attr, dispatch_autorelease_frequency_t(rawValue: 0)!)
102102
case .workItem:
103103
// DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM
104-
return CDispatch.dispatch_queue_attr_make_with_autorelease_frequency(attr, dispatch_autorelease_frequency_t(1))
104+
return CDispatch.dispatch_queue_attr_make_with_autorelease_frequency(attr, dispatch_autorelease_frequency_t(rawValue: 1)!)
105105
case .never:
106106
// DISPATCH_AUTORELEASE_FREQUENCY_NEVER
107-
return CDispatch.dispatch_queue_attr_make_with_autorelease_frequency(attr, dispatch_autorelease_frequency_t(2))
107+
return CDispatch.dispatch_queue_attr_make_with_autorelease_frequency(attr, dispatch_autorelease_frequency_t(rawValue: 2)!)
108108
}
109109
} else {
110110
return attr

0 commit comments

Comments
 (0)