Legacy mode for non-multiplatform stdlib sources
This commit is contained in:
@@ -45,7 +45,8 @@ class MemberBuilder(
|
|||||||
|
|
||||||
val f get() = family
|
val f get() = family
|
||||||
|
|
||||||
var hasPlatformSpecializations: Boolean = false
|
private val legacyMode = true
|
||||||
|
var hasPlatformSpecializations: Boolean = legacyMode
|
||||||
private set
|
private set
|
||||||
|
|
||||||
var doc: String? = null; private set
|
var doc: String? = null; private set
|
||||||
@@ -143,10 +144,19 @@ class MemberBuilder(
|
|||||||
|
|
||||||
|
|
||||||
fun build(builder: Appendable) {
|
fun build(builder: Appendable) {
|
||||||
// TODO: legacy mode when all is headerOnly + no_impl
|
val headerOnly: Boolean
|
||||||
// except functions with optional parameters - they are common + no_impl
|
val isImpl: Boolean
|
||||||
val headerOnly: Boolean = platform == Platform.Common && hasPlatformSpecializations
|
if (!legacyMode) {
|
||||||
val isImpl: Boolean = platform != Platform.Common && Platform.Common in allowedPlatforms
|
headerOnly = platform == Platform.Common && hasPlatformSpecializations
|
||||||
|
isImpl = platform != Platform.Common && Platform.Common in allowedPlatforms
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// legacy mode when all is headerOnly + no_impl
|
||||||
|
// except functions with optional parameters - they are common + no_impl
|
||||||
|
val hasOptionalParams = signature.contains("=")
|
||||||
|
headerOnly = platform == Platform.Common && !hasOptionalParams
|
||||||
|
isImpl = false
|
||||||
|
}
|
||||||
|
|
||||||
val returnType = returns ?: throw RuntimeException("No return type specified for $signature")
|
val returnType = returns ?: throw RuntimeException("No return type specified for $signature")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user