CValue

Native
1.3
abstract class CValue<T : CVariable> : CValues<T>

The single immutable C value. It is self-contained and doesn't depend on native memory.

TODO: consider providing an adapter instead of subtyping CValues.

Constructors

Native
1.3

<init>

The single immutable C value. It is self-contained and doesn't depend on native memory.

CValue()

Extension Functions

Native
1.3

copy

fun <T : CStructVar> CValue<T>.copy(
    modify: T.() -> Unit
): CValue<T>
Native
1.3

getBytes

fun <T : CVariable> CValues<T>.getBytes(): ByteArray
Native
1.3

placeTo

fun <T : CVariable> CValues<T>.placeTo(
    scope: AutofreeScope
): CPointer<T>
Native
1.3

useContents

Calls the block with temporary copy if this value as receiver.

fun <T : CStructVar, R> CValue<T>.useContents(
    block: T.() -> R
): R
Native
1.3

write

fun <T : CVariable> CValue<T>.write(location: NativePtr)