From 7a0af5d05803c46db0c9e4a7ab734625e2b5e13f Mon Sep 17 00:00:00 2001 From: Abduqodiri Qurbonzoda Date: Tue, 11 Jul 2023 15:01:11 +0300 Subject: [PATCH] Mark the CName annotation with ExperimentalNativeApi --- .../runtime/src/main/kotlin/kotlin/native/Annotations.kt | 2 ++ libraries/stdlib/src/kotlin/annotations/NativeAnnotations.kt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/kotlin-native/runtime/src/main/kotlin/kotlin/native/Annotations.kt b/kotlin-native/runtime/src/main/kotlin/kotlin/native/Annotations.kt index d9df80fefb0..f755c8ec14c 100644 --- a/kotlin-native/runtime/src/main/kotlin/kotlin/native/Annotations.kt +++ b/kotlin-native/runtime/src/main/kotlin/kotlin/native/Annotations.kt @@ -5,6 +5,7 @@ package kotlin.native +import kotlin.experimental.ExperimentalNativeApi import kotlin.experimental.ExperimentalObjCName import kotlin.experimental.ExperimentalObjCRefinement import kotlin.reflect.KClass @@ -86,6 +87,7 @@ public annotation class EagerInitialization * [externName] controls the name of top level function, [shortName] controls the short name. * If [externName] is empty, no top level declaration is being created. */ +@ExperimentalNativeApi @Target(AnnotationTarget.FUNCTION) @Retention(AnnotationRetention.BINARY) public actual annotation class CName(actual val externName: String = "", actual val shortName: String = "") diff --git a/libraries/stdlib/src/kotlin/annotations/NativeAnnotations.kt b/libraries/stdlib/src/kotlin/annotations/NativeAnnotations.kt index 431d5f8651a..e68cfcb1ed1 100644 --- a/libraries/stdlib/src/kotlin/annotations/NativeAnnotations.kt +++ b/libraries/stdlib/src/kotlin/annotations/NativeAnnotations.kt @@ -5,6 +5,7 @@ package kotlin.native +import kotlin.experimental.ExperimentalNativeApi import kotlin.experimental.ExperimentalObjCName import kotlin.experimental.ExperimentalObjCRefinement @@ -14,6 +15,7 @@ import kotlin.experimental.ExperimentalObjCRefinement * [externName] controls the name of top level function, [shortName] controls the short name. * If [externName] is empty, no top level declaration is being created. */ +@ExperimentalNativeApi @SinceKotlin("1.5") @Target(AnnotationTarget.FUNCTION) @Retention(AnnotationRetention.BINARY)