Skip to content

Commit d2029b8

Browse files
committed
Hide declarations in internal package
1 parent 5e79739 commit d2029b8

File tree

13 files changed

+46
-28
lines changed

13 files changed

+46
-28
lines changed

common/kotlinx-coroutines-core-common/src/main/kotlin/kotlinx/coroutines/experimental/channels/AbstractChannel.kt

+8-8
Original file line numberDiff line numberDiff line change
@@ -935,28 +935,28 @@ public abstract class AbstractChannel<E> : AbstractSendChannel<E>(), Channel<E>
935935
}
936936

937937
/** @suppress **This is unstable API and it is subject to change.** */
938-
@JvmField val OFFER_SUCCESS: Any = Symbol("OFFER_SUCCESS")
938+
@JvmField internal val OFFER_SUCCESS: Any = Symbol("OFFER_SUCCESS")
939939

940940
/** @suppress **This is unstable API and it is subject to change.** */
941-
@JvmField val OFFER_FAILED: Any = Symbol("OFFER_FAILED")
941+
@JvmField internal val OFFER_FAILED: Any = Symbol("OFFER_FAILED")
942942

943943
/** @suppress **This is unstable API and it is subject to change.** */
944-
@JvmField val POLL_FAILED: Any = Symbol("POLL_FAILED")
944+
@JvmField internal val POLL_FAILED: Any = Symbol("POLL_FAILED")
945945

946946
/** @suppress **This is unstable API and it is subject to change.** */
947-
@JvmField val ENQUEUE_FAILED: Any = Symbol("ENQUEUE_FAILED")
947+
@JvmField internal val ENQUEUE_FAILED: Any = Symbol("ENQUEUE_FAILED")
948948

949949
/** @suppress **This is unstable API and it is subject to change.** */
950-
@JvmField val SELECT_STARTED: Any = Symbol("SELECT_STARTED")
950+
@JvmField internal val SELECT_STARTED: Any = Symbol("SELECT_STARTED")
951951

952952
/** @suppress **This is unstable API and it is subject to change.** */
953-
@JvmField val NULL_VALUE: Any = Symbol("NULL_VALUE")
953+
@JvmField internal val NULL_VALUE: Any = Symbol("NULL_VALUE")
954954

955955
/** @suppress **This is unstable API and it is subject to change.** */
956-
@JvmField val CLOSE_RESUMED: Any = Symbol("CLOSE_RESUMED")
956+
@JvmField internal val CLOSE_RESUMED: Any = Symbol("CLOSE_RESUMED")
957957

958958
/** @suppress **This is unstable API and it is subject to change.** */
959-
@JvmField val SEND_RESUMED = Symbol("SEND_RESUMED")
959+
@JvmField internal val SEND_RESUMED = Symbol("SEND_RESUMED")
960960

961961
/**
962962
* Represents sending waiter in the queue.

common/kotlinx-coroutines-core-common/src/main/kotlin/kotlinx/coroutines/experimental/internal/ArrayCopy.common.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ package kotlinx.coroutines.experimental.internal
33
/**
44
* Cross-platform array copy. Overlaps of source and destination are not supported
55
*/
6-
expect fun <E> arraycopy(source: Array<E>, srcPos: Int, destination: Array<E?>, destinationStart: Int, length: Int)
6+
internal expect fun <E> arraycopy(source: Array<E>, srcPos: Int, destination: Array<E?>, destinationStart: Int, length: Int)
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
package kotlinx.coroutines.experimental.internal
22

3-
expect interface Closeable {
3+
/**
4+
* Closeable entity.
5+
* @suppress **Deprecated**
6+
*/
7+
@Deprecated("No replacement, see specific use")
8+
public expect interface Closeable {
9+
@Deprecated("No replacement, see specific code")
410
fun close()
511
}

common/kotlinx-coroutines-core-common/src/main/kotlin/kotlinx/coroutines/experimental/internal/Concurrent.common.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ package kotlinx.coroutines.experimental.internal
66
*
77
* Note that this alias is intentionally not named as CopyOnWriteList to avoid accidental misusage outside of ArrayBroadcastChannel
88
*/
9-
typealias SubscribersList<E> = MutableList<E>
9+
internal typealias SubscribersList<E> = MutableList<E>
1010

11-
expect fun <E> subscriberList(): SubscribersList<E>
11+
internal expect fun <E> subscriberList(): SubscribersList<E>
1212

13-
expect class ReentrantLock() {
13+
internal expect class ReentrantLock() {
1414
fun tryLock(): Boolean
1515
fun unlock(): Unit
1616
}
1717

18-
expect inline fun <T> ReentrantLock.withLock(action: () -> T): T
18+
internal expect inline fun <T> ReentrantLock.withLock(action: () -> T): T

common/kotlinx-coroutines-core-common/src/main/kotlin/kotlinx/coroutines/experimental/internal/LockFreeLinkedList.common.kt

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public expect open class AddLastDesc<T : LockFreeLinkedListNode>(
6060
override fun finishOnSuccess(affected: LockFreeLinkedListNode, next: LockFreeLinkedListNode)
6161
}
6262

63+
/** @suppress **This is unstable API and it is subject to change.** */
6364
public expect open class RemoveFirstDesc<T>(queue: LockFreeLinkedListNode): AbstractAtomicDesc {
6465
val queue: LockFreeLinkedListNode
6566
public val result: T

common/kotlinx-coroutines-core-common/src/main/kotlin/kotlinx/coroutines/experimental/internal/Symbol.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ package kotlinx.coroutines.experimental.internal
2121
*
2222
* @suppress **This is unstable API and it is subject to change.**
2323
*/
24-
public class Symbol(val symbol: String) {
24+
internal class Symbol(val symbol: String) {
2525
override fun toString(): String = symbol
2626
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package kotlinx.coroutines.experimental.internal
22

3-
actual fun <E> arraycopy(source: Array<E>, srcPos: Int, destination: Array<E?>, destinationStart: Int, length: Int){
3+
internal actual fun <E> arraycopy(source: Array<E>, srcPos: Int, destination: Array<E?>, destinationStart: Int, length: Int){
44
System.arraycopy(source, srcPos, destination, destinationStart, length)
55
}
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
package kotlinx.coroutines.experimental.internal
22

3-
actual typealias Closeable = java.io.Closeable
3+
/**
4+
* Closeable entity.
5+
* @suppress **Deprecated**
6+
*/
7+
@Deprecated("No replacement, see specific use")
8+
public actual typealias Closeable = java.io.Closeable

core/kotlinx-coroutines-core/src/main/kotlin/kotlinx/coroutines/experimental/internal/Concurrent.kt

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ package kotlinx.coroutines.experimental.internal
33
import java.util.concurrent.*
44
import kotlin.concurrent.withLock as withLockJvm
55

6-
actual fun <E> subscriberList(): MutableList<E> = CopyOnWriteArrayList<E>()
6+
internal actual fun <E> subscriberList(): MutableList<E> = CopyOnWriteArrayList<E>()
77

8-
actual typealias ReentrantLock = java.util.concurrent.locks.ReentrantLock
8+
@Suppress("ACTUAL_WITHOUT_EXPECT")
9+
internal actual typealias ReentrantLock = java.util.concurrent.locks.ReentrantLock
910

10-
actual inline fun <T> ReentrantLock.withLock(action: () -> T) = this.withLockJvm(action)
11+
internal actual inline fun <T> ReentrantLock.withLock(action: () -> T) = this.withLockJvm(action)

js/kotlinx-coroutines-core-js/src/main/kotlin/kotlinx/coroutines/experimental/internal/ArrayCopy.kt

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package kotlinx.coroutines.experimental.internal
22

3-
4-
actual fun <E> arraycopy(source: Array<E>, srcPos: Int, destination: Array<E?>, destinationStart: Int, length: Int) {
3+
internal actual fun <E> arraycopy(source: Array<E>, srcPos: Int, destination: Array<E?>, destinationStart: Int, length: Int) {
54
var destinationIndex = destinationStart
65
for (sourceIndex in srcPos until srcPos + length) {
76
destination[destinationIndex++] = source[sourceIndex]
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
package kotlinx.coroutines.experimental.internal
22

3-
actual interface Closeable {
4-
actual fun close()
3+
/**
4+
* Closeable entity.
5+
* @suppress **Deprecated**
6+
*/
7+
@Deprecated("No replacement, see specific use")
8+
public actual interface Closeable {
9+
public actual fun close()
510
}
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
package kotlinx.coroutines.experimental.internal
22

3-
actual typealias ReentrantLock = NoOpLock
3+
internal actual typealias ReentrantLock = NoOpLock
44

5-
actual inline fun <T> ReentrantLock.withLock(action: () -> T) = action()
5+
internal actual inline fun <T> ReentrantLock.withLock(action: () -> T) = action()
66

7-
public class NoOpLock {
7+
internal class NoOpLock {
88
fun tryLock() = true
99
fun unlock(): Unit {}
1010
}
1111

12-
actual fun <E> subscriberList(): MutableList<E> = ArrayList()
12+
internal actual fun <E> subscriberList(): MutableList<E> = ArrayList()

js/kotlinx-coroutines-core-js/src/main/kotlin/kotlinx/coroutines/experimental/internal/LinkedList.kt

+1
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ public actual open class AddLastDesc<T : Node> actual constructor(
113113
protected actual override fun finishOnSuccess(affected: LockFreeLinkedListNode, next: LockFreeLinkedListNode) = Unit
114114
}
115115

116+
/** @suppress **This is unstable API and it is subject to change.** */
116117
public actual open class RemoveFirstDesc<T> actual constructor(
117118
actual val queue: LockFreeLinkedListNode
118119
) : AbstractAtomicDesc() {

0 commit comments

Comments
 (0)