> On Dec 13, 2017, at 10:28 PM, John McCall via swift-dev <[email protected]> > wrote: > >> On Dec 13, 2017, at 8:35 PM, Saleem Abdulrasool <[email protected] >> <mailto:[email protected]>> wrote: >> >>> On Wed, Dec 13, 2017 at 4:14 PM, John McCall <[email protected] >>> <mailto:[email protected]>> wrote: > >>> >>> - SILGen may need to introduce thunks when passing around such functions >>> as @convention(c) function values. Code for this already exists in order >>> to allow C functions to be passed around as native function values. >> >> This sounds pretty good and would broaden the abilities for swift to FFI to >> existing code. > > Yeah. This should work well as long as there isn't an API that needs to > traffic in non-standard function *pointers*.
32-bit Windows needs to do that. Callback functions passed to the Windows API via parameters or struct fields are often __stdcall but the default calling convention is __cdecl. -- Greg Parker [email protected] Runtime Wrangler
_______________________________________________ swift-dev mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-dev
