Skip to content

Commit

Permalink
Fix build for Swift versions < 6
Browse files Browse the repository at this point in the history
  • Loading branch information
weichsel committed Dec 26, 2024
1 parent a694cb6 commit 8151541
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Sources/ZIPFoundation/Archive+ZIP64.swift
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,13 @@ extension Archive.ZIP64EndOfCentralDirectory {
}

/// Properties that represent the maximum value of each field
#if swift(>=6.0)
nonisolated(unsafe) var maxUInt32 = UInt32.max
nonisolated(unsafe) var maxUInt16 = UInt16.max
#else
var maxUInt32 = UInt32.max
var maxUInt16 = UInt16.max
#endif

var maxCompressedSize: UInt32 { maxUInt32 }
var maxUncompressedSize: UInt32 { maxUInt32 }
Expand Down

0 comments on commit 8151541

Please sign in to comment.