diff options
| author | ruki <[email protected]> | 2025-02-20 22:43:03 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-02-20 22:43:03 +0800 |
| commit | 48065b9580ec329b67a48ce4c7dd79c606ac2aa2 (patch) | |
| tree | 318be1b1affde940f5d09af1a4d4aeb1c8248dc6 /tests/projects/kotlin-native/static_library/src/foo.kt | |
| parent | 0a438f8721806ae97b97c592a5dbc036c3f7ae4d (diff) | |
improve static/shared library for kotlin
Diffstat (limited to 'tests/projects/kotlin-native/static_library/src/foo.kt')
| -rw-r--r-- | tests/projects/kotlin-native/static_library/src/foo.kt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/projects/kotlin-native/static_library/src/foo.kt b/tests/projects/kotlin-native/static_library/src/foo.kt new file mode 100644 index 000000000..64ed2a016 --- /dev/null +++ b/tests/projects/kotlin-native/static_library/src/foo.kt @@ -0,0 +1,8 @@ +@file:OptIn(ExperimentalNativeApi::class) + +import kotlin.experimental.ExperimentalNativeApi +import kotlinx.cinterop.* + +@ExperimentalNativeApi +@CName("kotlin_add") +fun add(a: Int, b: Int): Int = a + b |
