Re: [swift-users] Updating C-wrapper to Swift 3

2016-09-29 Thread Quinn "The Eskimo!" via swift-users
On 28 Sep 2016, at 18:39, Michael Ilseman wrote: > Could you share the generated interface for these functions, so that we can > see how they are being imported into Swift? Based on some random expat docs I found on the ’net [1], I grabbed the relevant declarations and put them in a bridging

Re: [swift-users] Updating C-wrapper to Swift 3

2016-09-28 Thread Michael Ilseman via swift-users
> On Sep 28, 2016, at 10:03 AM, John Brownie via swift-users > wrote: > > Thanks for the pointers. Good reading, but I'm still confused. I think that > the first issue is clear to me now, but I don't know what I have to do to > make the closure be seen as satisfying the type of the function p

Re: [swift-users] Updating C-wrapper to Swift 3

2016-09-28 Thread John Brownie via swift-users
Thanks for the pointers. Good reading, but I'm still confused. I think that the first issue is clear to me now, but I don't know what I have to do to make the closure be seen as satisfying the type of the function pointer. It worked in Swift 2.2 as XML_SetEndElementHandler(parser)

Re: [swift-users] Updating C-wrapper to Swift 3

2016-09-28 Thread Quinn "The Eskimo!" via swift-users
On 28 Sep 2016, at 07:29, John Brownie via swift-users wrote: > Where can I read up on how to make the conversion? I recommend reading the whole “Migrating to Swift 2.3 or Swift 3 from Swift 2.2” doc, but for this specific issue you should start with the “UnsafeRawPointer Migration” doc that

[swift-users] Updating C-wrapper to Swift 3

2016-09-27 Thread John Brownie via swift-users
I have a Swift wrapper for the expat XML parser, and I just went through the update to Swift 3, and I'm thrown a series of errors that mostly appear to be of two types. Here is a representative function of the first type: func parse() throws { var done = false while !done {