[swift-users] swift lldb crash on ubuntu

2016-07-29 Thread Matt Whiteside via swift-users
I’m trying to track down a crashing LLDB process on Ubuntu. I’m using the CLion IDE’s swift plugin, and LLDB is crashing when I hit the first breakpoint. Does anyone know where the Swift LLDB core dump would get written on Ubuntu Linux? Thanks for any help on this, -Matt _

Re: [swift-users] C Pointers and Memory

2016-07-29 Thread Chris McIntyre via swift-users
Hi guys, I’m having issues with Swift pointers. I feel like the Interactive With C APis document only gets you half way there. For example, look at this from the docs If you have declared a function like this one: func takesAMutablePointer(x: UnsafeMutablePointer) { // ... } You can call

Re: [swift-users] C Pointers and Memory

2016-07-29 Thread James Campbell via swift-users
No I haven't thats a big help thank you ! *___* *James⎥Head of Trolls* *ja...@supmenow.com ⎥supmenow.com * *Sup* *Runway East * *10 Finsbury Square* *London* * EC2A 1AF * On 29 July 2016 at 10:40, Zhao Xin wrote: > Have you read > http

Re: [swift-users] C Pointers and Memory

2016-07-29 Thread Zhao Xin via swift-users
Have you read https://developer.apple.com/library/tvos/documentation/Swift/Conceptual/BuildingCocoaApps/InteractingWithCAPIs.html#//apple_ref/doc/uid/TP40014216-CH8-ID17 ? Zhaoxin On Fri, Jul 29, 2016 at 4:55 PM, James Campbell via swift-users < swift-users@swift.org> wrote: > ​Do you know of a

Re: [swift-users] C Pointers and Memory

2016-07-29 Thread James Campbell via swift-users
​Do you know of any resources to brush up on the pointer aspect of swift ? ​ *___* *James⎥Head of Trolls* *ja...@supmenow.com ⎥supmenow.com * *Sup* *Runway East * *10 Finsbury Square* *London* * EC2A 1AF * On 29 July 2016 at 09:10, Dmitr

Re: [swift-users] C Pointers and Memory

2016-07-29 Thread Dmitri Gribenko via swift-users
On Fri, Jul 29, 2016 at 12:55 AM, James Campbell wrote: > So this: > > if let data = someArrayGeneratingFunction() { > cFunction(UnsafeMutablePointer(data)) > } > > Has issues with the array passed to c getting corrupted, but this doesn't: > > let data = someArrayGeneratingFunction() > > if let

Re: [swift-users] C Pointers and Memory

2016-07-29 Thread James Campbell via swift-users
So this: if let data = someArrayGeneratingFunction() { cFunction(UnsafeMutablePointer(data)) } Has issues with the array passed to c getting corrupted, but this doesn't: let data = someArrayGeneratingFunction() if let data = data { cFunction(UnsafeMutablePointer(data)) } *_

Re: [swift-users] Compact iteration of optional collection?

2016-07-29 Thread Quinn "The Eskimo!" via swift-users
On 28 Jul 2016, at 22:55, Rick Mann via swift-users wrote: > I often call methods that return an optional collection. Why do these methods return an optional collection rather an empty collection? Back in the day Cocoa code used to work that way because constructing empty collections was exp