Skip to content

Commit aabed34

Browse files
committed
Add required opt-ins for using commonized functions with different bit width integers
1 parent 6f43cbe commit aabed34

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

core/linux/src/TimeZoneNative.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ internal actual class RegionTimeZone(private val tzid: TimeZoneRules, actual ove
5858
actual override fun offsetAtImpl(instant: Instant): UtcOffset = tzid.infoAtInstant(instant)
5959
}
6060

61+
@OptIn(UnsafeNumber::class)
6162
internal actual fun currentTime(): Instant = memScoped {
6263
val tm = alloc<timespec>()
6364
val error = clock_gettime(CLOCK_REALTIME, tm.ptr)

core/nix/src/internal/filesystem.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Use of this source code is governed by the Apache 2.0 License that can be found in the LICENSE.txt file.
44
*/
55

6-
@file:OptIn(ExperimentalForeignApi::class)
6+
@file:OptIn(ExperimentalForeignApi::class, UnsafeNumber::class)
77
package kotlinx.datetime.internal
88

99
import kotlinx.cinterop.*

0 commit comments

Comments
 (0)