I could swear this was compiling a couple days ago, as I was making the call 
inside the block and dealing with issues around that.

Can anyone explain what's going on here?

class
MyClass
{
    func
    execute()
    {
        self.dataBuffer = Data(capacity: lgsImageDataSize)
        
        self.dataBuffer?.withUnsafeMutableBytes
        ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
        error: 'inout Data' is not convertible to 'Data'

        { (inBuffer) -> Void in
            some_call(inBuffer)
            debugLog("some_call() called")
        }
    }
    
    var             dataBuffer:     Data?
}

some_call() is a C function that looks like this:

        some_result*    some_call(void* data);

The generated interface in Xcode looks like:

        public func some_call(_ data: UnsafeMutableRawPointer!) -> 
OpaquePointer!

I tried commenting out the call to some_call(), but I still get the error.

-- 
Rick Mann
rm...@latencyzero.com


_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to