Re: [swift-users] Need documentation on how to import C header into Swift 3.0

2016-05-21 Thread Michal Kalinowski via swift-users
Some good info in Package Manager docs: https://github.com/apple/swift-package-manager/blob/master/Documentation/SystemModules.md Hope that helps, MichaƂ > On 21 May 2016, at 17:42, Ken Burgett via swift-users > wrote: > > Hi Joe, > > Can you point me to a good

[swift-users] Need documentation on how to import C header into Swift 3.0

2016-05-21 Thread Ken Burgett via swift-users
Hi Joe, Can you point me to a good example of how to build a Swift 3.0 module that wraps some C code? I have searched, but keep finding Swift 2.2 documentation and it all seems to involve connecting to Objective-C, while my interests are accessing C code on a Linux platform, using the

Re: [swift-users] UnsafeMutablePointer vs. UnsafeMutablePointer

2016-05-21 Thread Dmitri Gribenko via swift-users
On Sat, May 21, 2016 at 2:15 AM, Adrian Zubarev via swift-users wrote: > So basically if I do something like this I should be on the safe side: Yes, this code is safe. If you just want to store a contiguous buffer of elements of the same type, you should consider using

Re: [swift-users] UnsafeMutablePointer vs. UnsafeMutablePointer

2016-05-21 Thread Adrian Zubarev via swift-users
So basically if I do something like this I should be on the safe side: public class Characters { private let reference: UnsafeMutablePointer var characters: [Character] { var characters = [Character]() for index in