Backed out 5 changesets (bug 1890092, bug 1888683) for causing build bustages & crash...
[gecko.git] / third_party / rust / uniffi_bindgen / src / bindings / kotlin / templates / UInt32Helper.kt
blobda7b5b28d67fdca1a88022683d0b822a1246dbd5
1 public object FfiConverterUInt: FfiConverter<UInt, Int> {
2     override fun lift(value: Int): UInt {
3         return value.toUInt()
4     }
6     override fun read(buf: ByteBuffer): UInt {
7         return lift(buf.getInt())
8     }
10     override fun lower(value: UInt): Int {
11         return value.toInt()
12     }
14     override fun allocationSize(value: UInt) = 4
16     override fun write(value: UInt, buf: ByteBuffer) {
17         buf.putInt(value.toInt())
18     }