Skip to content

Commit 1eb29e5

Browse files
authored
Make _ThreadLocal.value public under OpenSwiftUI SPI (#3)
1 parent 07e0d9c commit 1eb29e5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Sources/OpenObservation/ThreadLocal.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ func _tlsGet() -> UnsafeMutableRawPointer?
1818
@_silgen_name("_swift_openobservation_tls_set")
1919
func _tlsSet(_ value: UnsafeMutableRawPointer?)
2020

21-
struct _ThreadLocal {
22-
static var value: UnsafeMutableRawPointer? {
21+
@_spi(OpenSwiftUI)
22+
public struct _ThreadLocal {
23+
public static var value: UnsafeMutableRawPointer? {
2324
get {
2425
return _tlsGet()
2526
}
@@ -46,8 +47,9 @@ import Bionic
4647
#error("Unsupported platform")
4748
#endif
4849

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

0 commit comments

Comments
 (0)