Scoop API

scoop:scoop.core:0.1.0

withDataPointer

function withDataPointer

source · line 19
public
@Unsafe
public fun <T : value, R> Array<T>.withDataPointer(block: (Ptr<T>, Long) -> R): R

Extension receiver: Array<T>

Borrows contiguous array element storage for the callback, passing its pointer and element count. The pointer is valid only during the callback and must not escape.

function withDataPointer

source · line 27
public
@Unsafe
public fun <T : value, R> MutableArray<T>.withDataPointer(block: (Ptr<T>, Long) -> R): R

Extension receiver: MutableArray<T>

Borrows contiguous array element storage for the callback, passing its pointer and element count. The pointer is valid only during the callback and must not escape.