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

This commit is contained in:
enbandari
2017-04-16 22:00:53 +08:00
committed by SvyatoslavScherbina
parent a0e0644998
commit bb8f04ab87
@@ -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