Join Slack
Powered by
Is it possible to reinterpret cast Kotlin primitiv...
# kotlin-native
p
Pedro Cortés
01/29/2025, 3:51 PM
Is it possible to reinterpret cast Kotlin primitives/objects for example like ByteArray to IntArray or is limited to actual C types?
e
ephemient
01/29/2025, 4:03 PM
no, Kotlin arrays are not simple pointers but contain type information as well
ephemient
01/29/2025, 5:43 PM
oh right, they also contain length and that would be wrong after a primitive reinterpret cast
4
Views
Open in Slack
Previous
Next