Re: [swift-users] Why API marked as `macOS 10.12+` can be used in macOS 10.11?

2016-09-25 Thread Zhao Xin via swift-users
Glad to know it. Thank you, Jack. Zhaoxin On Mon, Sep 26, 2016 at 10:17 AM, Jack Lawrence wrote: > The API Reference SDK availability section in the documentation is > incorrect for symbols defined in a Swift overlay. This is a known issue. > > Unless it has an explicit @available attribute (ch

Re: [swift-users] Why API marked as `macOS 10.12+` can be used in macOS 10.11?

2016-09-25 Thread Jack Lawrence via swift-users
The API Reference SDK availability section in the documentation is incorrect for symbols defined in a Swift overlay. This is a known issue. Unless it has an explicit @available attribute (check the generated interface), any symbol defined in a Swift overlay is available for all platform versions

[swift-users] Why API marked as `macOS 10.12+` can be used in macOS 10.11?

2016-09-25 Thread Zhao Xin via swift-users
In the official migrating guide . You can choose from two kinds of migration to perform: - *Use Swift 2.3* Modifies your project to enable the *Use Legacy Swift* build setting and provides source changes to be able to build against the new SDKs. - *

Re: [swift-users] QualityOfService for concurrentPerform in Swift 3

2016-09-25 Thread Saagar Jha via swift-users
Hmm, I didn’t realize that concurrentPerform doesn’t allow you to pass in your own queue…this looks like an oversight to me. Maybe someone with more experience with libdispatch could explain? Saagar Jha > On Sep 25, 2016, at 09:13, Gerriet M. Denkmann wrote: > > >> On 25 Sep 2016, at 23:08

Re: [swift-users] Swift 3 and bytes

2016-09-25 Thread Jens Persson via swift-users
Use UnsafeMutableRawPointer. On Sun, Sep 25, 2016 at 1:28 PM, Gerriet M. Denkmann via swift-users < swift-users@swift.org> wrote: > Got: > var bitField : UnsafeMutablePointer > bitField = UnsafeMutablePointer< UInt32 >.allocate(capacity: 912) > > But now I want to read a certain range as bytes (n

Re: [swift-users] QualityOfService for concurrentPerform in Swift 3

2016-09-25 Thread Gerriet M. Denkmann via swift-users
> On 25 Sep 2016, at 23:08, Saagar Jha wrote: > > You might be looking for the DispatchQoS.QoSClass enum. > > Saagar Jha Probably. But how to make concurrentPerform use any of these enums? Gerriet. > >> On Sep 25, 2016, at 05:19, Gerriet M. Denkmann via swift-users >> wrote: >> >> In O

Re: [swift-users] QualityOfService for concurrentPerform in Swift 3

2016-09-25 Thread Saagar Jha via swift-users
You might be looking for the DispatchQoS.QoSClass enum. Saagar Jha > On Sep 25, 2016, at 05:19, Gerriet M. Denkmann via swift-users > wrote: > > In ObjC: > > dispatch_queue_t queue = dispatch_get_global_queue( > DISPATC

[swift-users] QualityOfService for concurrentPerform in Swift 3

2016-09-25 Thread Gerriet M. Denkmann via swift-users
In ObjC: dispatch_queue_t queue = dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_HIGH, 0 ); dispatch_apply( nbrThreads, queue, ^void(size_t idx) … In Swift 3: DispatchQueue.concurrentPerform( iterations: nbrThreads) … How can one specify the DISPATCH_QUEUE_PRIORITY or QualityOfSer

[swift-users] Swift 3 and bytes

2016-09-25 Thread Gerriet M. Denkmann via swift-users
Got: var bitField : UnsafeMutablePointer bitField = UnsafeMutablePointer< UInt32 >.allocate(capacity: 912) But now I want to read a certain range as bytes (not as UInt32); let staP = bitField + 23 let endP = bitField + 99 let staB = UnsafeMutablePointer(staP)← this does not work in Swift 3