blob: 0ccfc13e4e4d92b2249e77602da48b20e8b105df (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
fileprivate struct FfiConverterInt32: FfiConverterPrimitive {
typealias FfiType = Int32
typealias SwiftType = Int32
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> Int32 {
return try lift(readInt(&buf))
}
public static func write(_ value: Int32, into buf: inout [UInt8]) {
writeInt(&buf, lower(value))
}
}
|