Skip to content

Commit d5c5b86

Browse files
gmittertaciidgh
authored andcommitted
Fix Compilation of Lock.swift on Windows
Some variables were not changed when being renamed on Windows.
1 parent ee89d10 commit d5c5b86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/Basic/Lock.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public final class FileLock {
7979
overlapped.Offset = 0
8080
overlapped.OffsetHigh = 0
8181
overlapped.hEvent = nil
82-
if FALSE == LockFileEx(h, DWORD(LOCKFILE_EXCLUSIVE_LOCK), 0, DWORD(INT_MAX), DWORD(INT_MAX), &overlapped) {
82+
if FALSE == LockFileEx(handle, DWORD(LOCKFILE_EXCLUSIVE_LOCK), 0, DWORD(INT_MAX), DWORD(INT_MAX), &overlapped) {
8383
throw ProcessLockError.unableToAquireLock(errno: Int32(GetLastError()))
8484
}
8585
#else
@@ -110,7 +110,7 @@ public final class FileLock {
110110
overlapped.Offset = 0
111111
overlapped.OffsetHigh = 0
112112
overlapped.hEvent = nil
113-
UnlockFileEx(h, 0, DWORD(INT_MAX), DWORD(INT_MAX), &overlapped)
113+
UnlockFileEx(handle, 0, DWORD(INT_MAX), DWORD(INT_MAX), &overlapped)
114114
#else
115115
guard let fd = fileDescriptor else { return }
116116
flock(fd, LOCK_UN)

0 commit comments

Comments
 (0)