/*
 * Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
 * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
 */
package kotlinx.cinterop

//
// NOTE: THIS FILE IS AUTO-GENERATED by the generators/nativeInteropRuntime/NativeInteropRuntimeGenerator.kt
//

/**
 * Allocates variable with given value type and initializes it with given value.
 */
@Suppress("FINAL_UPPER_BOUND")
@ExperimentalForeignApi
public fun <T : Boolean> NativePlacement.alloc(value: T): BooleanVarOf<T> =
        alloc<BooleanVarOf<T>> { this.value = value }

/**
 * Allocates variable with given value type and initializes it with given value.
 */
@Suppress("FINAL_UPPER_BOUND")
@ExperimentalForeignApi
public fun <T : Byte> NativePlacement.alloc(value: T): ByteVarOf<T> =
        alloc<ByteVarOf<T>> { this.value = value }

/**
 * Allocates variable with given value type and initializes it with given value.
 */
@Suppress("FINAL_UPPER_BOUND")
@ExperimentalForeignApi
public fun <T : Short> NativePlacement.alloc(value: T): ShortVarOf<T> =
        alloc<ShortVarOf<T>> { this.value = value }

/**
 * Allocates variable with given value type and initializes it with given value.
 */
@Suppress("FINAL_UPPER_BOUND")
@ExperimentalForeignApi
public fun <T : Int> NativePlacement.alloc(value: T): IntVarOf<T> =
        alloc<IntVarOf<T>> { this.value = value }

/**
 * Allocates variable with given value type and initializes it with given value.
 */
@Suppress("FINAL_UPPER_BOUND")
@ExperimentalForeignApi
public fun <T : Long> NativePlacement.alloc(value: T): LongVarOf<T> =
        alloc<LongVarOf<T>> { this.value = value }

/**
 * Allocates variable with given value type and initializes it with given value.
 */
@Suppress("FINAL_UPPER_BOUND")
@ExperimentalForeignApi
public fun <T : UByte> NativePlacement.alloc(value: T): UByteVarOf<T> =
        alloc<UByteVarOf<T>> { this.value = value }

/**
 * Allocates variable with given value type and initializes it with given value.
 */
@Suppress("FINAL_UPPER_BOUND")
@ExperimentalForeignApi
public fun <T : UShort> NativePlacement.alloc(value: T): UShortVarOf<T> =
        alloc<UShortVarOf<T>> { this.value = value }

/**
 * Allocates variable with given value type and initializes it with given value.
 */
@Suppress("FINAL_UPPER_BOUND")
@ExperimentalForeignApi
public fun <T : UInt> NativePlacement.alloc(value: T): UIntVarOf<T> =
        alloc<UIntVarOf<T>> { this.value = value }

/**
 * Allocates variable with given value type and initializes it with given value.
 */
@Suppress("FINAL_UPPER_BOUND")
@ExperimentalForeignApi
public fun <T : ULong> NativePlacement.alloc(value: T): ULongVarOf<T> =
        alloc<ULongVarOf<T>> { this.value = value }

/**
 * Allocates variable with given value type and initializes it with given value.
 */
@Suppress("FINAL_UPPER_BOUND")
@ExperimentalForeignApi
public fun <T : Float> NativePlacement.alloc(value: T): FloatVarOf<T> =
        alloc<FloatVarOf<T>> { this.value = value }

/**
 * Allocates variable with given value type and initializes it with given value.
 */
@Suppress("FINAL_UPPER_BOUND")
@ExperimentalForeignApi
public fun <T : Double> NativePlacement.alloc(value: T): DoubleVarOf<T> =
        alloc<DoubleVarOf<T>> { this.value = value }

