|
|
|
|
|
by helge5
3424 days ago
|
|
A nice, I might give that a try, though the @_silgen_name("foobar") func foobar()
does seem to work just fine for now. Could change in the future of course, though I wonder how likely it is that the calling convention for this kind of Swift function is actually going to change.Note that the whole purpose of the function is to enter the Swift side from C just once. After that all is good, you can register any kind of convention-C callbacks. What I'd like to see is the ability to specify `@convention(c)` not just on types, but also on functions and structs. That would be sweet and reduce the requirement for C wrappers even more. |
|
It happens that @_silgen_name didn't break for me in 3.0. But I've been moving to @_cdecl.