【发布时间】:2016-09-14 09:54:58
【问题描述】:
swift3 中的后续行会出错。
out = UnsafeMutablePointer<Bytef>(data.mutableBytes)
无法使用类型为“(UnsafeMutableRawPointer)”的参数列表调用类型 'UnsafeMutablePointer<Bytef>' 的初始化程序
【问题讨论】:
-
我也有同样的问题...有人吗?
-
您需要将 data.mutableBytes 转换为 UnsafeMutablePointer
。我使用 data.mutableBytes.sumptionMemoryBound(to: Bytef.IntegerLiteralType.self)。
标签: swift3 unsafemutablepointer