InteropScope

expect class InteropScope

Hands Kotlin arrays to C for the duration of one call: pinned on Native, copied into native memory (and back with fromInterop) on JVM, Android and web. Empty and null arrays map to NullPointer. Use through interopScope or the usePinned helpers.

actual class InteropScope

Hands Kotlin arrays to C for the duration of one call: pinned on Native, copied into native memory (and back with fromInterop) on JVM, Android and web. Empty and null arrays map to NullPointer. Use through interopScope or the usePinned helpers.

actual class InteropScope

Hands Kotlin arrays to C for the duration of one call: pinned on Native, copied into native memory (and back with fromInterop) on JVM, Android and web. Empty and null arrays map to NullPointer. Use through interopScope or the usePinned helpers.

actual class InteropScope

Hands Kotlin arrays to C for the duration of one call: pinned on Native, copied into native memory (and back with fromInterop) on JVM, Android and web. Empty and null arrays map to NullPointer. Use through interopScope or the usePinned helpers.

Constructors

Link copied to clipboard
expect constructor()
actual constructor()
actual constructor()
actual constructor()

Functions

Link copied to clipboard
expect fun NativePointer.fromInterop(result: ByteArray)

Copies what C wrote at this pointer back into result (a no-op where the array was pinned).

expect fun NativePointer.fromInterop(result: IntArray)
expect fun NativePointer.fromInterop(result: LongArray)
actual fun NativePointer.fromInterop(result: ByteArray)

Copies what C wrote at this pointer back into result (a no-op where the array was pinned).

actual fun NativePointer.fromInterop(result: IntArray)
actual fun NativePointer.fromInterop(result: LongArray)
actual fun NativePointer.fromInterop(result: ByteArray)

Copies what C wrote at this pointer back into result (a no-op where the array was pinned).

actual fun NativePointer.fromInterop(result: IntArray)
actual fun NativePointer.fromInterop(result: LongArray)
actual fun NativePointer.fromInterop(result: ByteArray)

Copies what C wrote at this pointer back into result (a no-op where the array was pinned).

actual fun NativePointer.fromInterop(result: IntArray)
actual fun NativePointer.fromInterop(result: LongArray)
Link copied to clipboard
expect fun release()
actual fun release()
actual fun release()
actual fun release()
Link copied to clipboard
expect fun toInterop(array: ByteArray?): NativePointer
expect fun toInterop(array: DoubleArray?): NativePointer
expect fun toInterop(array: FloatArray?): NativePointer
expect fun toInterop(array: IntArray?): NativePointer
expect fun toInterop(array: LongArray?): NativePointer
expect fun toInterop(array: ShortArray?): NativePointer

expect fun toInterop(pointers: List<NativePointer>): NativePointer

An array of pointers (T* const*, or a T** C writes through), as wide as the platform's; read it back with readPointers.

actual fun toInterop(array: ByteArray?): NativePointer
actual fun toInterop(array: DoubleArray?): NativePointer
actual fun toInterop(array: FloatArray?): NativePointer
actual fun toInterop(array: IntArray?): NativePointer
actual fun toInterop(array: LongArray?): NativePointer
actual fun toInterop(array: ShortArray?): NativePointer

actual fun toInterop(pointers: List<NativePointer>): NativePointer

An array of pointers (T* const*, or a T** C writes through), as wide as the platform's; read it back with readPointers.

actual fun toInterop(array: ByteArray?): NativePointer
actual fun toInterop(array: DoubleArray?): NativePointer
actual fun toInterop(array: FloatArray?): NativePointer
actual fun toInterop(array: IntArray?): NativePointer
actual fun toInterop(array: LongArray?): NativePointer
actual fun toInterop(array: ShortArray?): NativePointer

actual fun toInterop(pointers: List<NativePointer>): NativePointer

An array of pointers (T* const*, or a T** C writes through), as wide as the platform's; read it back with readPointers.

actual fun toInterop(array: ByteArray?): NativePointer
actual fun toInterop(array: DoubleArray?): NativePointer
actual fun toInterop(array: FloatArray?): NativePointer
actual fun toInterop(array: IntArray?): NativePointer
actual fun toInterop(array: LongArray?): NativePointer
actual fun toInterop(array: ShortArray?): NativePointer

actual fun toInterop(pointers: List<NativePointer>): NativePointer

An array of pointers (T* const*, or a T** C writes through), as wide as the platform's; read it back with readPointers.

Link copied to clipboard

A NUL-terminated UTF-8 copy of string for a const char* parameter; null stays NullPointer.