Update conditional compilation blocks to use compiler version instead of language mode (#499)

This commit is contained in:
Si Beaumont authored and GitHub committed 2026-11-03 18:08:15 +00:00
1 parent 1586608eee
commit 32adcc5038
9 files changed
+19 -19

No files matched your search

+2 -2
View File
@@ -72,7 +72,7 @@ extension AES {
/// - nonce: The nonce the sealing process requires.
/// - authenticatedData: Additional data to be authenticated, if provided.
/// - tag: receives the 16-byte authentication tag
#if swift(<6.3)
#if compiler(<6.3)
@_lifetime(message: copy message)
#endif
public static func seal(
@@ -127,7 +127,7 @@ extension AES {
/// - authenticatedData: Additional data that was authenticated.
///
/// The call throws an error if decryption or authentication fail.
#if swift(<6.3)
#if compiler(<6.3)
@_lifetime(message: copy message)
#endif
public static func open(
@@ -59,7 +59,7 @@ enum OpenSSLAESGCMImpl {
return AES.GCM.SealedBox(combined: combined, nonceByteCount: nonce.count)
}
#if swift(<6.3)
#if compiler(<6.3)
@_lifetime(message: copy message)
#endif
@inlinable
@@ -119,7 +119,7 @@ enum OpenSSLAESGCMImpl {
}
/// Open a given message in place.
#if swift(<6.3)
#if compiler(<6.3)
@_lifetime(message: copy message)
#endif
@inlinable
@@ -48,7 +48,7 @@ extension BoringSSLAEAD {
}
/// Seal a given message in place
#if swift(<6.3)
#if compiler(<6.3)
@_lifetime(message: copy message)
#endif
func seal(
@@ -93,7 +93,7 @@ extension BoringSSLAEAD {
}
/// Open a given message in place.
#if swift(<6.3)
#if compiler(<6.3)
@_lifetime(message: copy message)
#endif
public func open(
@@ -150,7 +150,7 @@ enum OpenSSLChaChaPolyImpl {
return ChaChaPoly.SealedBox(combined: combined, nonceByteCount: nonce.count)
}
#if swift(<6.3)
#if compiler(<6.3)
@_lifetime(message: copy message)
#endif
static func encrypt(
@@ -211,7 +211,7 @@ enum OpenSSLChaChaPolyImpl {
}
}
#if swift(<6.3)
#if compiler(<6.3)
@_lifetime(message: copy message)
#endif
static func decrypt(
@@ -70,7 +70,7 @@ public enum ChaChaPoly: Cipher, Sendable {
/// - nonce: The nonce the sealing process requires.
/// - authenticatedData: Additional data to be authenticated.
/// - tag: Will be updated with the 16-byte authentication tag.
#if swift(<6.3)
#if compiler(<6.3)
@_lifetime(message: copy message)
#endif
public static func seal(
@@ -124,7 +124,7 @@ public enum ChaChaPoly: Cipher, Sendable {
/// - authenticatedData: Additional data that was authenticated.
///
/// The call throws an error if decryption or authentication fail.
#if swift(<6.3)
#if compiler(<6.3)
@_lifetime(message: copy message)
#endif
public static func open(
+2 -2
View File
@@ -48,7 +48,7 @@ public struct HKDF<H: HashFunction>: Sendable {
/// - info: The shared information to use for key derivation.
/// - outputKey: An output span that will be populated with the derived
/// symmetric key.
#if swift(<6.3)
#if compiler(<6.3)
@_lifetime(outputKey: copy outputKey)
#endif
public static func deriveKey(inputKeyMaterial: SymmetricKey,
@@ -258,7 +258,7 @@ public struct HKDF<H: HashFunction>: Sendable {
/// - outputByteCount: The length in bytes of the resulting symmetric key.
///
/// - Returns: The derived symmetric key.
#if swift(<6.3)
#if compiler(<6.3)
@_lifetime(output: copy output)
#endif
public static func expand(pseudoRandomKey prk: RawSpan, info: RawSpan?, into output: inout OutputRawSpan) {
+2 -2
View File
@@ -57,7 +57,7 @@ extension ContiguousArray where Element == UInt8 {
extension OutputRawSpan {
/// Append the contents of the given raw span to this output span.
#if swift(<6.3)
#if compiler(<6.3)
@_lifetime(self: copy self)
#endif
mutating func append(contentsOf bytes: RawSpan) {
@@ -69,7 +69,7 @@ extension OutputRawSpan {
extension OutputSpan<UInt8> {
/// Append the contents of the given raw span to this output span.
#if swift(<6.3)
#if compiler(<6.3)
@_lifetime(self: copy self)
#endif
mutating func append(contentsOf bytes: RawSpan) {
@@ -45,7 +45,7 @@ extension UnsafeMutableRawBufferPointer {
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
extension MutableRawSpan {
#if swift(<6.3)
#if compiler(<6.3)
@_lifetime(self: copy self)
#endif
mutating func initializeWithRandomBytes(count: Int) {
@@ -55,7 +55,7 @@ extension MutableRawSpan {
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
extension OutputRawSpan {
#if swift(<6.3)
#if compiler(<6.3)
@_lifetime(self: copy self)
#endif
mutating func appendingRandomBytes(count: Int) {
@@ -153,7 +153,7 @@ extension BoringSSLAEAD.AEADContext {
/// Lowest level seal operation that calls into BoringSSL directly and
/// operates on already-allocated memory.
#if swift(<6.3)
#if compiler(<6.3)
@_lifetime(tag: copy tag)
#endif
public func seal(
@@ -303,7 +303,7 @@ extension BoringSSLAEAD.AEADContext {
}
/// Lowest level call into BoringSSL that decrypts in place.
#if swift(<6.3)
#if compiler(<6.3)
@_lifetime(message: copy message)
#endif
public func open(
@@ -47,7 +47,7 @@ extension UnsafeMutableRawBufferPointer {
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
extension OutputRawSpan {
#if swift(<6.3)
#if compiler(<6.3)
@_lifetime(self: copy self)
#endif
package mutating func appendingRandomBytes(count: Int) {