I just ran into a use case where I needed to compa...
# kotlin-native
l
I just ran into a use case where I needed to compare two pointers, and I noticed that there’s nothing like the below in kotlinx.cinterop. Would this be worth adding to the cinterop library?
Copy code
operator fun COpaquePointer?.compareTo(other: COpaquePointer?): Int {
    return (toLong() - other.toLong()).toInt()
}