[Native] Escape the module name in the C adapter.
This previously failed if the module name contaned dots or dashes, e.g. ``` kotlinc-native ~/test.kt -produce static -module-name="foo-bar.baz" ``` This change espaces `-` and `.` similar to `ObjCExportNamer`'s `abbreviate`.
This commit is contained in:
committed by
SvyatoslavScherbina
parent
f895e92b11
commit
50250ccf65
+1
-1
@@ -521,7 +521,7 @@ private fun ModuleDescriptor.getPackageFragments(): List<PackageFragmentDescript
|
||||
internal class CAdapterGenerator(val context: Context) : DeclarationDescriptorVisitor<Boolean, Void?> {
|
||||
|
||||
private val scopes = mutableListOf<ExportedElementScope>()
|
||||
internal val prefix = context.config.fullExportedNamePrefix
|
||||
internal val prefix = context.config.fullExportedNamePrefix.replace("-|\\.".toRegex(), "_")
|
||||
private lateinit var outputStreamWriter: PrintWriter
|
||||
private val paramNamesRecorded = mutableMapOf<String, Int>()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user