From e0049a16004c2469bb6b5c643ea45c7ca23dc264 Mon Sep 17 00:00:00 2001 From: Johannes Weiss Date: Fri, 1 May 2020 08:01:28 +0100 Subject: [PATCH] @_implementationOnly also for Swift 5.3 (#212) Motivation: @_implementationOnly also works in Swift 5.3, let's use it. Modification: Use @_implementationOnly for Swift 5.1 ... 5.3 Result: Proper 5.3 support. Co-authored-by: Cory Benfield --- Sources/NIOSSL/ByteBufferBIO.swift | 2 +- Sources/NIOSSL/NIOSSLHandler.swift | 2 +- Sources/NIOSSL/SSLCallbacks.swift | 2 +- Sources/NIOSSL/SSLCertificate.swift | 2 +- Sources/NIOSSL/SSLConnection.swift | 2 +- Sources/NIOSSL/SSLContext.swift | 2 +- Sources/NIOSSL/SSLErrors.swift | 2 +- Sources/NIOSSL/SSLInit.swift | 2 +- Sources/NIOSSL/SSLPKCS12Bundle.swift | 2 +- Sources/NIOSSL/SSLPrivateKey.swift | 2 +- Sources/NIOSSL/SSLPublicKey.swift | 2 +- Sources/NIOSSL/SecurityFrameworkCertificateVerification.swift | 2 +- Sources/NIOSSL/TLSConfiguration.swift | 2 +- Tests/NIOSSLTests/ByteBufferBIOTest.swift | 2 +- Tests/NIOSSLTests/NIOSSLALPNTest.swift | 2 +- Tests/NIOSSLTests/NIOSSLIntegrationTest.swift | 2 +- Tests/NIOSSLTests/NIOSSLTestHelpers.swift | 2 +- Tests/NIOSSLTests/TLSConfigurationTest.swift | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Sources/NIOSSL/ByteBufferBIO.swift b/Sources/NIOSSL/ByteBufferBIO.swift index 787f45da..93fcc428 100644 --- a/Sources/NIOSSL/ByteBufferBIO.swift +++ b/Sources/NIOSSL/ByteBufferBIO.swift @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// import NIO -#if compiler(>=5.1) && compiler(<5.3) +#if compiler(>=5.1) && compiler(<5.4) @_implementationOnly import CNIOBoringSSL #else import CNIOBoringSSL diff --git a/Sources/NIOSSL/NIOSSLHandler.swift b/Sources/NIOSSL/NIOSSLHandler.swift index 1124b9aa..a20e231c 100644 --- a/Sources/NIOSSL/NIOSSLHandler.swift +++ b/Sources/NIOSSL/NIOSSLHandler.swift @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// import NIO -#if compiler(>=5.1) && compiler(<5.3) +#if compiler(>=5.1) && compiler(<5.4) @_implementationOnly import CNIOBoringSSL #else import CNIOBoringSSL diff --git a/Sources/NIOSSL/SSLCallbacks.swift b/Sources/NIOSSL/SSLCallbacks.swift index beae3005..755d5701 100644 --- a/Sources/NIOSSL/SSLCallbacks.swift +++ b/Sources/NIOSSL/SSLCallbacks.swift @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=5.1) && compiler(<5.3) +#if compiler(>=5.1) && compiler(<5.4) @_implementationOnly import CNIOBoringSSL #else import CNIOBoringSSL diff --git a/Sources/NIOSSL/SSLCertificate.swift b/Sources/NIOSSL/SSLCertificate.swift index 9735b062..da2ee189 100644 --- a/Sources/NIOSSL/SSLCertificate.swift +++ b/Sources/NIOSSL/SSLCertificate.swift @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=5.1) && compiler(<5.3) +#if compiler(>=5.1) && compiler(<5.4) @_implementationOnly import CNIOBoringSSL @_implementationOnly import CNIOBoringSSLShims #else diff --git a/Sources/NIOSSL/SSLConnection.swift b/Sources/NIOSSL/SSLConnection.swift index 21920066..3b178c79 100644 --- a/Sources/NIOSSL/SSLConnection.swift +++ b/Sources/NIOSSL/SSLConnection.swift @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// import NIO -#if compiler(>=5.1) && compiler(<5.3) +#if compiler(>=5.1) && compiler(<5.4) @_implementationOnly import CNIOBoringSSL #else import CNIOBoringSSL diff --git a/Sources/NIOSSL/SSLContext.swift b/Sources/NIOSSL/SSLContext.swift index ac44c29e..9197d429 100644 --- a/Sources/NIOSSL/SSLContext.swift +++ b/Sources/NIOSSL/SSLContext.swift @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// import NIO -#if compiler(>=5.1) && compiler(<5.3) +#if compiler(>=5.1) && compiler(<5.4) @_implementationOnly import CNIOBoringSSL @_implementationOnly import CNIOBoringSSLShims #else diff --git a/Sources/NIOSSL/SSLErrors.swift b/Sources/NIOSSL/SSLErrors.swift index b0ec5dfc..c14f0962 100644 --- a/Sources/NIOSSL/SSLErrors.swift +++ b/Sources/NIOSSL/SSLErrors.swift @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=5.1) && compiler(<5.3) +#if compiler(>=5.1) && compiler(<5.4) @_implementationOnly import CNIOBoringSSL #else import CNIOBoringSSL diff --git a/Sources/NIOSSL/SSLInit.swift b/Sources/NIOSSL/SSLInit.swift index 253e6e8a..117d018f 100644 --- a/Sources/NIOSSL/SSLInit.swift +++ b/Sources/NIOSSL/SSLInit.swift @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=5.1) && compiler(<5.3) +#if compiler(>=5.1) && compiler(<5.4) @_implementationOnly import CNIOBoringSSL #else import CNIOBoringSSL diff --git a/Sources/NIOSSL/SSLPKCS12Bundle.swift b/Sources/NIOSSL/SSLPKCS12Bundle.swift index e774497a..8f1c2f76 100644 --- a/Sources/NIOSSL/SSLPKCS12Bundle.swift +++ b/Sources/NIOSSL/SSLPKCS12Bundle.swift @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=5.1) && compiler(<5.3) +#if compiler(>=5.1) && compiler(<5.4) @_implementationOnly import CNIOBoringSSL #else import CNIOBoringSSL diff --git a/Sources/NIOSSL/SSLPrivateKey.swift b/Sources/NIOSSL/SSLPrivateKey.swift index c508fe9e..1a288343 100644 --- a/Sources/NIOSSL/SSLPrivateKey.swift +++ b/Sources/NIOSSL/SSLPrivateKey.swift @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=5.1) && compiler(<5.3) +#if compiler(>=5.1) && compiler(<5.4) @_implementationOnly import CNIOBoringSSL #else import CNIOBoringSSL diff --git a/Sources/NIOSSL/SSLPublicKey.swift b/Sources/NIOSSL/SSLPublicKey.swift index bdd91c9c..5a30a749 100644 --- a/Sources/NIOSSL/SSLPublicKey.swift +++ b/Sources/NIOSSL/SSLPublicKey.swift @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=5.1) && compiler(<5.3) +#if compiler(>=5.1) && compiler(<5.4) @_implementationOnly import CNIOBoringSSL #else import CNIOBoringSSL diff --git a/Sources/NIOSSL/SecurityFrameworkCertificateVerification.swift b/Sources/NIOSSL/SecurityFrameworkCertificateVerification.swift index e2ebeb93..1ed6c8c9 100644 --- a/Sources/NIOSSL/SecurityFrameworkCertificateVerification.swift +++ b/Sources/NIOSSL/SecurityFrameworkCertificateVerification.swift @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// import NIO -#if compiler(>=5.1) && compiler(<5.3) +#if compiler(>=5.1) && compiler(<5.4) @_implementationOnly import CNIOBoringSSL #else import CNIOBoringSSL diff --git a/Sources/NIOSSL/TLSConfiguration.swift b/Sources/NIOSSL/TLSConfiguration.swift index 8c777927..58e0e3d4 100644 --- a/Sources/NIOSSL/TLSConfiguration.swift +++ b/Sources/NIOSSL/TLSConfiguration.swift @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=5.1) && compiler(<5.3) +#if compiler(>=5.1) && compiler(<5.4) @_implementationOnly import CNIOBoringSSL #else import CNIOBoringSSL diff --git a/Tests/NIOSSLTests/ByteBufferBIOTest.swift b/Tests/NIOSSLTests/ByteBufferBIOTest.swift index 16d688b9..43c0920e 100644 --- a/Tests/NIOSSLTests/ByteBufferBIOTest.swift +++ b/Tests/NIOSSLTests/ByteBufferBIOTest.swift @@ -14,7 +14,7 @@ import XCTest import NIO -#if compiler(>=5.1) && compiler(<5.3) +#if compiler(>=5.1) && compiler(<5.4) @_implementationOnly import CNIOBoringSSL #else import CNIOBoringSSL diff --git a/Tests/NIOSSLTests/NIOSSLALPNTest.swift b/Tests/NIOSSLTests/NIOSSLALPNTest.swift index 88f54401..7d734f71 100644 --- a/Tests/NIOSSLTests/NIOSSLALPNTest.swift +++ b/Tests/NIOSSLTests/NIOSSLALPNTest.swift @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// import XCTest -#if compiler(>=5.1) && compiler(<5.3) +#if compiler(>=5.1) && compiler(<5.4) @_implementationOnly import CNIOBoringSSL #else import CNIOBoringSSL diff --git a/Tests/NIOSSLTests/NIOSSLIntegrationTest.swift b/Tests/NIOSSLTests/NIOSSLIntegrationTest.swift index 956d5810..96fca6e4 100644 --- a/Tests/NIOSSLTests/NIOSSLIntegrationTest.swift +++ b/Tests/NIOSSLTests/NIOSSLIntegrationTest.swift @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// import XCTest -#if compiler(>=5.1) && compiler(<5.3) +#if compiler(>=5.1) && compiler(<5.4) @_implementationOnly import CNIOBoringSSL #else import CNIOBoringSSL diff --git a/Tests/NIOSSLTests/NIOSSLTestHelpers.swift b/Tests/NIOSSLTests/NIOSSLTestHelpers.swift index 070de0e6..ed955f3d 100644 --- a/Tests/NIOSSLTests/NIOSSLTestHelpers.swift +++ b/Tests/NIOSSLTests/NIOSSLTestHelpers.swift @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// import Foundation -#if compiler(>=5.1) && compiler(<5.3) +#if compiler(>=5.1) && compiler(<5.4) @_implementationOnly import CNIOBoringSSL #else import CNIOBoringSSL diff --git a/Tests/NIOSSLTests/TLSConfigurationTest.swift b/Tests/NIOSSLTests/TLSConfigurationTest.swift index b381ccbd..96231ceb 100644 --- a/Tests/NIOSSLTests/TLSConfigurationTest.swift +++ b/Tests/NIOSSLTests/TLSConfigurationTest.swift @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// import XCTest -#if compiler(>=5.1) && compiler(<5.3) +#if compiler(>=5.1) && compiler(<5.4) @_implementationOnly import CNIOBoringSSL #else import CNIOBoringSSL