Skip to content

Commit cc49e68

Browse files
authored
Merge pull request #20908 from compnerd/thread-corrections
SwiftPrivateThreadExtras: fix windows build
2 parents ce82e80 + c32daed commit cc49e68

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stdlib/private/SwiftPrivateThreadExtras/SwiftPrivateThreadExtras.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,15 @@ public func _stdlib_thread_join<Result>(
120120
let result = WaitForSingleObject(thread, 0xffffffff);
121121
// TODO(compnerd) modularize WinBase.h for WAIT_OBJECT_0 (0)
122122
if result == 0 {
123-
let threadResult: DWORD = 0
123+
var threadResult: DWORD = 0
124124
GetExitCodeThread(thread, &threadResult)
125125
CloseHandle(thread)
126126

127-
return (result,
127+
return (CInt(result),
128128
UnsafeMutablePointer<DWORD>(&threadResult)
129129
.withMemoryRebound(to: Result.self, capacity: 1){ $0.pointee })
130130
} else {
131-
return (result, nil)
131+
return (CInt(result), nil)
132132
}
133133
#else
134134
var threadResultRawPtr: UnsafeMutableRawPointer?

0 commit comments

Comments
 (0)