Skip to content

Commit f4f9dae

Browse files
committed
Make _ThreadLocal.value public under OpenSwiftUI SPI
Expose the value property of _ThreadLocal as public API under the OpenSwiftUI SPI to allow access from the OpenSwiftUI framework while keeping it hidden from general public API.
1 parent 07e0d9c commit f4f9dae

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Sources/OpenObservation/ThreadLocal.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ func _tlsGet() -> UnsafeMutableRawPointer?
1919
func _tlsSet(_ value: UnsafeMutableRawPointer?)
2020

2121
struct _ThreadLocal {
22-
static var value: UnsafeMutableRawPointer? {
22+
@_spi(OpenSwiftUI)
23+
public static var value: UnsafeMutableRawPointer? {
2324
get {
2425
return _tlsGet()
2526
}
@@ -47,7 +48,8 @@ import Bionic
4748
#endif
4849

4950
struct _ThreadLocal {
50-
static var value: UnsafeMutableRawPointer? {
51+
@_spi(OpenSwiftUI)
52+
public static var value: UnsafeMutableRawPointer? {
5153
get {
5254
#if canImport(Darwin)
5355
return pthread_getspecific(key.key)

0 commit comments

Comments
 (0)