Re: [swift-dev] Guarantees of Tuples as Fixed Sized (stack allocated) Arrays

2017-05-02 Thread Johannes Weiss via swift-dev
Thanks very much John, that's what I expected and hoped for as it's enough to call kevent() for a (kevent_t, kevent_t) used as struct kevent[2] . > On 29 Apr 2017, at 00:28, John McCall wrote: > >> On Apr 28, 2017, at 7:03 AM, Johannes Weiss via swift-dev >&g

Re: [swift-dev] [swift-users] Guarantees of Tuples as Fixed Sized (stack allocated) Arrays

2017-04-28 Thread Johannes Weiss via swift-dev
Hi Martin, > On 28 Apr 2017, at 12:59, Martin R wrote: > > As far as I know, the only guarantee is made for structures imported from C. > From > https://lists.swift.org/pipermail/swift-users/Week-of-Mon-20160516/001968.html > : > >Swift structs have unspecified layout. If you depend on a

[swift-dev] Guarantees of Tuples as Fixed Sized (stack allocated) Arrays

2017-04-28 Thread Johannes Weiss via swift-dev
Hi swift-users, (sorry for the cross post to swift-dev, but wasn't sure where it belongs) I tried to find guarantees about the memory layout Swift tuples but couldn't find anything. The reason I ask is because I'd like to use them as fixed sized (stack allocated) arrays. I'm pretty sure they're