Skip to content

Commit 08fc796

Browse files
committed
Update function on pointers backport on older Swift versions
1 parent d6a7130 commit 08fc796

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Sources/IkigaJSON/Codable/JSONEncoder.swift

+8
Original file line numberDiff line numberDiff line change
@@ -718,3 +718,11 @@ fileprivate struct UnkeyedJSONEncodingContainer: UnkeyedEncodingContainer {
718718
return _JSONEncoder(codingPath: codingPath, userInfo: self.encoder.userInfo, data: self.encoder.data)
719719
}
720720
}
721+
722+
#if swift(<5.8)
723+
extension UnsafeMutablePointer {
724+
func update(from buffer: UnsafePointer<Pointer>, count: Int) {
725+
self.assign(from: buffer, count: count)
726+
}
727+
}
728+
#endif

0 commit comments

Comments
 (0)