<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I've noticed that, when imported to Swift, the definitions for DISPATCH_QUEUE_CONCURRENT and DISPATCH_QUEUE_SERIAL aren't correct.<div class=""><br class=""></div><div class="">Specifically, the Linux program I'm porting has build errors of the form</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">error: use of unresolved identifier 'DISPATCH_QUEUE_CONCURRENT'</div></blockquote><br class=""><div class="">and</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">error: cannot convert value of type '()' to expected argument type 'dispatch_queue_attr_t' (aka 'COpaquePointer')</div><div class="">private let queue = dispatch_queue_create("foo", DISPATCH_QUEUE_SERIAL)</div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^~~~~~~~~~~~~~~~~~~~~</div><div class=""><br class=""></div></blockquote>"<a href="https://github.com/apple/swift-corelibs-libdispatch/blob/acd56f625cce04d280fa83712e0add9c34506073/dispatch/queue.h#L437" class="">Using the source, luke</a>" suggests that<div class=""><br class=""></div><div class=""><ul class="MailOutline"><li class="">DISPATCH_QUEUE_CONCURRENT is&nbsp;<a href="https://github.com/apple/swift-corelibs-libdispatch/blob/acd56f625cce04d280fa83712e0add9c34506073/dispatch/queue.h#L437" class="">defined to a function invocation</a>, which may not be imported by the Swift importer. &nbsp;I guess this problem is resolved somehow on Darwin (perhaps by somehow explaining to Swift to use a constant for this value?) but the mechanism is not clear.</li><li class="">DISPATCH_QUEUE_SERIAL (aka NULL) is apparently imported as a closure for some reason</li></ul><div class=""><br class=""></div><div class="">I used Cmd-Opt-J to take a look at where these symbols come from on Xcode, and it seems that, indeed, they don't come from dispatch.h. &nbsp;But I'm not sure, in that case, where they come from.</div><div class=""><br class=""></div><div class="">Maybe somebody can give me a hint how to go about working around / resolving this?</div><div class=""><br class=""></div><div class="">Drew</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></div></body></html>