|
|
|
|
|
by xenadu02
3425 days ago
|
|
Be careful; it currently relies on the Objecive-C runtime which is not present on non-Apple platforms. As the PR says, it also doesn't handle turning throwing functions into errors, nor does it check for collisions. Another thing you can do is declare a function pointer type in C and assign to it from Swift by calling a C setter function (more or less a small trampoline). |
|
Maybe I misunderstand you, but this doesn't seem to be the case, at least not in Swift 3.0-RELEASE. I was able to use @_cdecl for a callback in a Tcl extension (https://tcl.wiki/48057) on Linux.