Skip to content

Commit 8c70edf

Browse files
committed
Use internal import instead of implementationOnly import [swiftlang#5108]
1 parent e55e1d8 commit 8c70edf

File tree

79 files changed

+80
-80
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+80
-80
lines changed

Sources/Foundation/Bridging.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
@_implementationOnly import CoreFoundation
13+
internal import CoreFoundation
1414

1515
#if canImport(ObjectiveC)
1616
import ObjectiveC

Sources/Foundation/Bundle.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88
//
99

10-
@_implementationOnly import CoreFoundation
10+
internal import CoreFoundation
1111

1212
@_silgen_name("swift_getTypeContextDescriptor")
1313
private func _getTypeContextDescriptor(of cls: AnyClass) -> UnsafeRawPointer

Sources/Foundation/DateComponents.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
@_implementationOnly import CoreFoundation
13+
internal import CoreFoundation
1414

1515
extension DateComponents : ReferenceConvertible {
1616
public typealias ReferenceType = NSDateComponents

Sources/Foundation/DateFormatter.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88
//
99

10-
@_implementationOnly import CoreFoundation
10+
internal import CoreFoundation
1111
@_spi(SwiftCorelibsFoundation) import FoundationEssentials
1212
internal import Synchronization
1313

Sources/Foundation/DateInterval.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
@_implementationOnly import CoreFoundation
13+
internal import CoreFoundation
1414

1515
extension DateInterval : _ObjectiveCBridgeable {
1616
public static func _isBridgedToObjectiveC() -> Bool {

Sources/Foundation/DateIntervalFormatter.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88
//
99

10-
@_implementationOnly import CoreFoundation
10+
internal import CoreFoundation
1111

1212
internal let kCFDateIntervalFormatterNoStyle = CFDateIntervalFormatterStyle.noStyle
1313
internal let kCFDateIntervalFormatterShortStyle = CFDateIntervalFormatterStyle.shortStyle

Sources/Foundation/Dictionary.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88
//
99

10-
@_implementationOnly import CoreFoundation
10+
internal import CoreFoundation
1111

1212
extension Dictionary : _ObjectiveCBridgeable {
1313

Sources/Foundation/FileHandle.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88
//
99

10-
@_implementationOnly import CoreFoundation
10+
internal import CoreFoundation
1111
#if canImport(Dispatch)
1212
import Dispatch
1313
#endif

Sources/Foundation/FileManager+POSIX.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ internal func &(left: UInt32, right: mode_t) -> mode_t {
1313
}
1414
#endif
1515

16-
@_implementationOnly import CoreFoundation
16+
internal import CoreFoundation
1717
internal import Synchronization
1818

1919
#if os(WASI)
@@ -32,7 +32,7 @@ internal var O_WRONLY: Int32 { _getConst_O_WRONLY() }
3232
fileprivate let previousStatxFailed = Mutex(false)
3333
#endif
3434

35-
@_implementationOnly import CoreFoundation
35+
internal import CoreFoundation
3636

3737
extension FileManager {
3838
internal func _mountedVolumeURLs(includingResourceValuesForKeys propertyKeys: [URLResourceKey]?, options: VolumeEnumerationOptions = []) -> [URL]? {

Sources/Foundation/FileManager+Win32.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88
//
99

10-
@_implementationOnly import CoreFoundation
10+
internal import CoreFoundation
1111

1212
#if os(Windows)
1313
import let WinSDK.INVALID_FILE_ATTRIBUTES

Sources/Foundation/FileManager.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fileprivate let SF_IMMUTABLE: Int32 = 1
1313
fileprivate let UF_HIDDEN: Int32 = 1
1414
#endif
1515

16-
@_implementationOnly import CoreFoundation
16+
internal import CoreFoundation
1717
#if os(Windows)
1818
import CRT
1919
import WinSDK

Sources/Foundation/Host.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88
//
99

10-
@_implementationOnly import CoreFoundation
10+
internal import CoreFoundation
1111
#if os(Windows)
1212
import WinSDK
1313
#endif

Sources/Foundation/ISO8601DateFormatter.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88
//
99

10-
@_implementationOnly import CoreFoundation
10+
internal import CoreFoundation
1111

1212
extension ISO8601DateFormatter {
1313

Sources/Foundation/JSONSerialization.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
@_implementationOnly import CoreFoundation
13+
internal import CoreFoundation
1414

1515
extension JSONSerialization {
1616
public struct ReadingOptions : OptionSet, Sendable {

Sources/Foundation/Measurement.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
#if DEPLOYMENT_RUNTIME_SWIFT
14-
@_implementationOnly import CoreFoundation
14+
internal import CoreFoundation
1515
#else
1616
@_exported import Foundation // Clang module
1717
import _SwiftCoreFoundationOverlayShims

Sources/Foundation/NSArray.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88
//
99

10-
@_implementationOnly import CoreFoundation
10+
internal import CoreFoundation
1111

1212
@available(*, unavailable)
1313
extension NSArray : @unchecked Sendable { }

Sources/Foundation/NSAttributedString.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88
//
99

10-
@_implementationOnly import CoreFoundation
10+
internal import CoreFoundation
1111

1212
extension NSAttributedString {
1313
public struct Key: RawRepresentable, Equatable, Hashable, Sendable {

Sources/Foundation/NSCFArray.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//
99

1010

11-
@_implementationOnly import CoreFoundation
11+
internal import CoreFoundation
1212

1313
internal final class _NSCFArray : NSMutableArray {
1414
deinit {

Sources/Foundation/NSCFBoolean.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//
99

1010

11-
@_implementationOnly import CoreFoundation
11+
internal import CoreFoundation
1212

1313
internal class __NSCFBoolean : NSNumber, @unchecked Sendable {
1414
override var hash: Int {

Sources/Foundation/NSCFCharacterSet.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright © 2016 Apple. All rights reserved.
77
//
88

9-
@_implementationOnly import CoreFoundation
9+
internal import CoreFoundation
1010

1111
internal class _NSCFCharacterSet : NSMutableCharacterSet {
1212

Sources/Foundation/NSCFDictionary.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//
99

1010

11-
@_implementationOnly import CoreFoundation
11+
internal import CoreFoundation
1212

1313
internal final class _NSCFDictionary : NSMutableDictionary {
1414
deinit {

Sources/Foundation/NSCFSet.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//
99

1010

11-
@_implementationOnly import CoreFoundation
11+
internal import CoreFoundation
1212

1313
internal final class _NSCFSet : NSMutableSet {
1414
deinit {

Sources/Foundation/NSCFString.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//
99

1010

11-
@_implementationOnly import CoreFoundation
11+
internal import CoreFoundation
1212

1313
@usableFromInline
1414
internal class _NSCFString : NSMutableString {

Sources/Foundation/NSCalendar.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88
//
99

10-
@_implementationOnly import CoreFoundation
10+
internal import CoreFoundation
1111
@_spi(SwiftCorelibsFoundation) @_exported import FoundationEssentials
1212

1313
internal let kCFCalendarUnitEra = CFCalendarUnit.era

Sources/Foundation/NSCharacterSet.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//
99

1010

11-
@_implementationOnly import CoreFoundation
11+
internal import CoreFoundation
1212

1313
let kCFCharacterSetControl = CFCharacterSetPredefinedSet.control
1414
let kCFCharacterSetWhitespace = CFCharacterSetPredefinedSet.whitespace

Sources/Foundation/NSConcreteValue.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88
//
99

10-
@_implementationOnly import CoreFoundation
10+
internal import CoreFoundation
1111
internal import Synchronization
1212

1313
internal class NSConcreteValue : NSValue, @unchecked Sendable {

Sources/Foundation/NSData.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88
//
99

10-
@_implementationOnly import CoreFoundation
10+
internal import CoreFoundation
1111
#if !os(WASI)
1212
import Dispatch
1313
#endif

Sources/Foundation/NSDate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88
//
99

10-
@_implementationOnly import CoreFoundation
10+
internal import CoreFoundation
1111

1212
public typealias TimeInterval = Double
1313

Sources/Foundation/NSDateComponents.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//
99

1010
@_exported import FoundationEssentials
11-
@_implementationOnly import CoreFoundation
11+
internal import CoreFoundation
1212

1313

1414
// This is a just used as an extensible struct, basically;

Sources/Foundation/NSDictionary.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//
99

1010

11-
@_implementationOnly import CoreFoundation
11+
internal import CoreFoundation
1212

1313
#if !os(WASI)
1414
import Dispatch

Sources/Foundation/NSError.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import Glibc
1818
import CRT
1919
#endif
2020

21-
@_implementationOnly import CoreFoundation
21+
internal import CoreFoundation
2222
internal import Synchronization
2323

2424
public typealias NSErrorDomain = NSString

Sources/Foundation/NSKeyedArchiver.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88
//
99

10-
@_implementationOnly import CoreFoundation
10+
internal import CoreFoundation
1111
internal import Synchronization
1212

1313
/// Archives created using the class method `archivedData(withRootObject:)` use this key

Sources/Foundation/NSKeyedArchiverHelpers.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88
//
99

10-
@_implementationOnly import CoreFoundation
10+
internal import CoreFoundation
1111

1212
extension CFKeyedArchiverUID : _NSBridgeable {
1313
typealias NSType = _NSKeyedArchiverUID

Sources/Foundation/NSKeyedCoderOldStyleArray.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88
//
99

10-
@_implementationOnly import CoreFoundation
10+
internal import CoreFoundation
1111

1212
internal final class _NSKeyedCoderOldStyleArray : NSObject, NSCopying, NSSecureCoding, NSCoding {
1313

Sources/Foundation/NSKeyedUnarchiver.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88
//
99

10-
@_implementationOnly import CoreFoundation
10+
internal import CoreFoundation
1111
internal import Synchronization
1212

1313
@available(*, unavailable)

Sources/Foundation/NSLocale.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//
99

1010

11-
@_implementationOnly import CoreFoundation
11+
internal import CoreFoundation
1212
@_spi(SwiftCorelibsFoundation) @_exported import FoundationEssentials
1313
@_exported import FoundationInternationalization
1414

Sources/Foundation/NSLock.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88
//
99

10-
@_implementationOnly import CoreFoundation
10+
internal import CoreFoundation
1111

1212
#if canImport(Glibc)
1313
import Glibc

Sources/Foundation/NSLog.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88
//
99

10-
@_implementationOnly import CoreFoundation
10+
internal import CoreFoundation
1111

1212
/* Output from NSLogv is serialized, in that only one thread in a process can be doing
1313
* the writing/logging described above at a time. All attempts at writing/logging a

Sources/Foundation/NSNumber.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//
99

1010

11-
@_implementationOnly import CoreFoundation
11+
internal import CoreFoundation
1212
@_spi(SwiftCorelibsFoundation) @_exported import FoundationEssentials
1313

1414
internal let kCFNumberSInt8Type = CFNumberType.sInt8Type

Sources/Foundation/NSObjCRuntime.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//
99

1010

11-
@_implementationOnly import CoreFoundation
11+
internal import CoreFoundation
1212

1313
internal let kCFCompareLessThan = CFComparisonResult.compareLessThan
1414
internal let kCFCompareEqualTo = CFComparisonResult.compareEqualTo

Sources/Foundation/NSObject.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
@_exported import Dispatch
1515
#endif
1616

17-
@_implementationOnly import CoreFoundation
17+
internal import CoreFoundation
1818

1919
/// The `NSObjectProtocol` groups methods that are fundamental to all Foundation objects.
2020
///

Sources/Foundation/NSPathUtilities.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88
//
99

10-
@_implementationOnly import CoreFoundation
10+
internal import CoreFoundation
1111
#if os(Windows)
1212
import WinSDK
1313
#elseif os(WASI)

Sources/Foundation/NSRange.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#if DEPLOYMENT_RUNTIME_SWIFT
1111

12-
@_implementationOnly import CoreFoundation
12+
internal import CoreFoundation
1313

1414
public struct _NSRange : Sendable {
1515
public var location: Int

0 commit comments

Comments
 (0)