Skip to content

Commit f1258a0

Browse files
committed
Add comment regarding pointer cast
1 parent 491089a commit f1258a0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/RandomKit/Types/RandomGenerator/ThreadLocal.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ private func _key(for type: Any.Type) -> pthread_key_t {
7373
} else {
7474
var key = pthread_key_t()
7575
pthread_key_create(&key) {
76+
// Cast required because argument is optional on some platforms (Linux) but not on others (macOS).
7677
guard let rawPointer = ($0 as UnsafeMutableRawPointer?) else {
7778
return
7879
}

0 commit comments

Comments
 (0)