3 ms·
> I wish they'd start by standardizing something equivalent to "extern C" in Swift There is the unofficial (but very relied upon) @_cdecl, if you're OK with ne
by favorited 5y ago
> I wish they'd start by standardizing something equivalent to "extern C" in Swift
There is the unofficial (but very relied upon) @_cdecl, if you're OK with needing to update your code if/when that eventually gets standardized. That attribute will take care of the calling convention difference for you.
https://github.com/apple/swift/blob/main/docs/ReferenceGuides/UnderscoredAttributes.md#user-content-_cdeclcname https://github.com/apple/swift/blob/main/docs/ReferenceGuide...
- sirwhinesalot 5y agoI'm aware, but it's still unofficial and I've been burned by depending on such things before. Hopefully it'll become official soon.