From bb8f04ab87db69636f8be0b1670acc33a53b3e84 Mon Sep 17 00:00:00 2001 From: enbandari <305779913@qq.com> Date: Sun, 16 Apr 2017 22:00:53 +0800 Subject: [PATCH] pkgName is from interop config "pkg" and in a format of "x.y.z", so we should replace "." with "_" instead of "/". Related Issue: https://github.com/JetBrains/kotlin-native/issues/490 --- .../jetbrains/kotlin/native/interop/gen/jvm/StubGenerator.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/StubGenerator.kt b/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/StubGenerator.kt index 18ad3fc8c10..54400049c0c 100644 --- a/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/StubGenerator.kt +++ b/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/StubGenerator.kt @@ -1188,7 +1188,7 @@ class StubGenerator( private val FunctionDecl.cStubName: String get() { require(platform == KotlinPlatform.NATIVE) - return "kni_" + pkgName.replace('/', '_') + '_' + this.name + return "kni_" + pkgName.replace('.', '_') + '_' + this.name } private val FunctionDecl.kotlinExternalName: String