Skip to content

Commit c32daed

Browse files
committed
SwiftPrivateThreadExtras: fix windows build
Missed casts and a let vs var issue. This was missed in the last bundle of patches.
1 parent 2ef35ac commit c32daed

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stdlib/private/SwiftPrivateThreadExtras/SwiftPrivateThreadExtras.swift

+3-3
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)