We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MacOS
12.0.1 (21A559) Apple Swift version 5.5 (swiftlang-1300.0.31.1 clang-1300.0.29.1) Target: x86_64-apple-macosx12.0
Linux:
Linux primary 5.4.0-90-generic #​101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focal Swift version 5.5.1 (swift-5.5.1-RELEASE) Target: x86_64-unknown-linux-gnu
md5: a69653a3763608dc24b58bb1e336880c
Issue Description:
When calling a C API from Swift that takes a dispatch queue as argument, on Linux the type conversion fails.
Example. A C function that defines a function that takes a dispatch_queue_t as argument.
Code (run-me.c) #include <dispatch/dispatch.h> void sayHiOnQueue(dispatch_queue_t queue);
Code (run-me.swift): import Foundation
let queue = DispatchQueue(label: "test") sayHiOnQueue(queue) Compiling via: swiftc -import-objc-header run-me.h -emit-object -module-name runme run-me.swift
On macOS this works as expected. On Linux this fails with:
run-me.swift:4:14: error: cannot convert value of type 'DispatchQueue' to expected argument type 'dispatch_queue_t?' (aka 'Optional<OpaquePointer>')
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Environment
MacOS
Linux:
Additional Detail from JIRA
md5: a69653a3763608dc24b58bb1e336880c
Issue Description:
When calling a C API from Swift that takes a dispatch queue as argument, on Linux the type conversion fails.
Example. A C function that defines a function that takes a dispatch_queue_t as argument.
Code (run-me.c)
#include <dispatch/dispatch.h>
void sayHiOnQueue(dispatch_queue_t queue);
Code (run-me.swift):
import Foundation
let queue = DispatchQueue(label: "test")
sayHiOnQueue(queue)
Compiling via:
swiftc -import-objc-header run-me.h -emit-object -module-name runme run-me.swift
On macOS this works as expected. On Linux this fails with:
The text was updated successfully, but these errors were encountered: