[K/N] Mark BitSet usages in stdlib with @ObsoleteNativeApi

This commit is contained in:
Abduqodiri Qurbonzoda
2023-03-22 12:02:51 +02:00
committed by Space Team
parent 9ff863ced7
commit 9076e5b112
4 changed files with 39 additions and 1 deletions
@@ -28,6 +28,7 @@ import kotlin.native.concurrent.AtomicReference
import kotlin.native.concurrent.freeze
import kotlin.native.BitSet
import kotlin.native.FreezingIsDeprecated
import kotlin.native.ObsoleteNativeApi
/**
* Unicode category (i.e. Ll, Lu).
@@ -49,7 +50,7 @@ internal class UnicodeCategoryScope(category: Int) : UnicodeCategory(category) {
* This class represents character classes, i.e. sets of character either predefined or user defined.
* Note: this class represent a token, not node, so being constructed by lexer.
*/
@OptIn(FreezingIsDeprecated::class)
@OptIn(FreezingIsDeprecated::class, ObsoleteNativeApi::class)
internal abstract class AbstractCharClass : SpecialToken() {
/**
* Show if the class has alternative meaning:
@@ -23,11 +23,13 @@
package kotlin.text.regex
import kotlin.native.BitSet
import kotlin.native.ObsoleteNativeApi
/**
* User defined character classes (e.g. [abef]).
*/
// TODO: replace the implementation with one using BitSet for first 256 symbols and a hash table / tree for the rest of UTF.
@OptIn(ObsoleteNativeApi::class)
internal class CharClass(val ignoreCase: Boolean = false, negative: Boolean = false) : AbstractCharClass() {
var invertedSurrogates = false