[swift-users] C compatible structs

KS Sreeram ks at claylabs.com
Mon Aug 1 08:37:56 CDT 2016

> On 01-Aug-2016, at 5:17 PM, Chris McIntyre <nothingwasdelivered at gmail.com> wrote:
> Swift's strideOf my give you what you want (I'm not at my Mac to test)

It doesn’t. Swift uses a different layout than C. In the earlier example code, strideof(Bar) is 8 in Swift, whereas sizeof(Bar) is 12 in C.

KS Sreeram

More information about the swift-users mailing list