Skip to content

Commit 59371db

Browse files
committed
SwiftPrivateThreadExtras: fix casting due to API changes
The recent changes to the UnsafemutablePointer prevented the "abuse" of the type for casting. Switch to `unsafeBitCast`. This should repair the Windows build.
1 parent baf2e4e commit 59371db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/private/SwiftPrivateThreadExtras/SwiftPrivateThreadExtras.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public func _stdlib_thread_create_block<Argument, Result>(
9696
if threadID == 0 {
9797
return (errno, nil)
9898
} else {
99-
return (0, UnsafeMutablePointer<ThreadHandle>(&threadID).pointee)
99+
return (0, unsafeBitCast(threadID, to: ThreadHandle.self))
100100
}
101101
#else
102102
var threadID = _make_pthread_t()

0 commit comments

Comments
 (0)