Skip to content

Commit 60506f3

Browse files
authored
Renamed _CShims to _FoundationCShims (#656)
Rationale: _CShims will effectivly become semi-public in the toolchain. We add the Foundation prefix to make it less generic.
1 parent db2fb92 commit 60506f3

Some content is hidden

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

44 files changed

+34
-34
lines changed

Package.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ let package = Package(
8989
],
9090
path: "Sources/Foundation"),
9191

92-
// _CShims (Internal)
93-
.target(name: "_CShims",
92+
// _FoundationCShims (Internal)
93+
.target(name: "_FoundationCShims",
9494
cSettings: [.define("_CRT_SECURE_NO_WARNINGS",
9595
.when(platforms: [.windows]))]),
9696

@@ -104,7 +104,7 @@ let package = Package(
104104
.target(
105105
name: "FoundationEssentials",
106106
dependencies: [
107-
"_CShims",
107+
"_FoundationCShims",
108108
"FoundationMacros",
109109
.product(name: "_RopeModule", package: "swift-collections"),
110110
.product(name: "OrderedCollections", package: "swift-collections"),
@@ -152,7 +152,7 @@ let package = Package(
152152
name: "FoundationInternationalization",
153153
dependencies: [
154154
.target(name: "FoundationEssentials"),
155-
.target(name: "_CShims"),
155+
.target(name: "_FoundationCShims"),
156156
.product(name: "_FoundationICU", package: "swift-foundation-icu")
157157
],
158158
exclude: [

Sources/FoundationEssentials/Data/Data+Error.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// For Logger
1515
internal import os
1616
internal import _ForSwiftFoundation
17-
internal import _CShims
17+
internal import _FoundationCShims
1818
#endif
1919

2020
internal func logFileIOErrno(_ err: Int32, at place: String) {

Sources/FoundationEssentials/Data/Data+Reading.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
internal import _ForSwiftFoundation
1515
#endif
1616

17-
internal import _CShims
17+
internal import _FoundationCShims
1818

1919
#if canImport(Darwin)
2020
import Darwin

Sources/FoundationEssentials/Data/Data+Writing.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ internal import _ForSwiftFoundation
1515
internal import DarwinPrivate // for VREG
1616
#endif
1717

18-
internal import _CShims
18+
internal import _FoundationCShims
1919

2020
#if canImport(Darwin)
2121
import Darwin

Sources/FoundationEssentials/Data/Data.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
@usableFromInline let memcmp = WASILibc.memcmp
4242
#endif
4343

44-
internal import _CShims
44+
internal import _FoundationCShims
4545

4646
#if canImport(Darwin)
4747
import Darwin

Sources/FoundationEssentials/FileManager/FileManager+Directories.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import CRT
2525
import WinSDK
2626
#endif
2727

28-
internal import _CShims
28+
internal import _FoundationCShims
2929

3030
#if FOUNDATION_FRAMEWORK
3131
func _LogSpecialFolderRecreation(_ fileManager: FileManager, _ path: String) {

Sources/FoundationEssentials/FileManager/FileManager+Files.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ internal import DarwinPrivate.sys.content_protection
1919
import Darwin
2020
#elseif canImport(Glibc)
2121
import Glibc
22-
internal import _CShims
22+
internal import _FoundationCShims
2323
#elseif os(Windows)
2424
import CRT
2525
import WinSDK

Sources/FoundationEssentials/FileManager/FileManager+SymbolicLinks.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import Glibc
1717
#elseif os(Windows)
1818
import CRT
1919
import WinSDK
20-
internal import _CShims
20+
internal import _FoundationCShims
2121
#endif
2222

2323
extension _FileManagerImpl {

Sources/FoundationEssentials/FileManager/FileManager+Utilities.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ internal import QuarantinePrivate
2525
import Darwin
2626
#elseif canImport(Glibc)
2727
import Glibc
28-
internal import _CShims
28+
internal import _FoundationCShims
2929
#elseif os(Windows)
3030
import CRT
3131
import WinSDK

Sources/FoundationEssentials/FileManager/FileOperations+Enumeration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ struct _Win32DirectoryContentsSequence: Sequence {
111111
import Darwin
112112
#elseif canImport(Glibc)
113113
import Glibc
114-
internal import _CShims
114+
internal import _FoundationCShims
115115
#endif
116116

117117
// MARK: Directory Iteration

Sources/FoundationEssentials/FileManager/FileOperations.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ internal import QuarantinePrivate
2828
#endif
2929
#endif
3030

31-
internal import _CShims
31+
internal import _FoundationCShims
3232

3333
extension CocoaError {
3434
fileprivate static func fileOperationError(_ code: CocoaError.Code, _ sourcePath: String, _ destinationPath: String? = nil, variant: String? = nil) -> CocoaError {

Sources/FoundationEssentials/JSON/JSON5Scanner.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import Darwin
1616
import Glibc
1717
#endif
1818

19-
internal import _CShims
19+
internal import _FoundationCShims
2020

2121
internal struct JSON5Scanner {
2222
let options: Options

Sources/FoundationEssentials/JSON/JSONDecoder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import Darwin
1616
import Glibc
1717
#endif
1818

19-
internal import _CShims
19+
internal import _FoundationCShims
2020

2121
/// A marker protocol used to determine whether a value is a `String`-keyed `Dictionary`
2222
/// containing `Decodable` values (in which case it should be exempt from key conversion strategies).

Sources/FoundationEssentials/JSON/JSONScanner.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ import Darwin
5959
import Glibc
6060
#endif // canImport(Darwin)
6161

62-
internal import _CShims
62+
internal import _FoundationCShims
6363

6464
internal class JSONMap {
6565
enum TypeDescriptor : Int {

Sources/FoundationEssentials/Locale/Locale_Cache.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ internal import CoreFoundation_Private.CFNotificationCenter
1717
internal import os
1818
#endif
1919

20-
internal import _CShims
20+
internal import _FoundationCShims
2121

2222
/// Singleton which listens for notifications about preference changes for Locale and holds cached singletons.
2323
struct LocaleCache : Sendable {

Sources/FoundationEssentials/Platform.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//
1010
//===----------------------------------------------------------------------===//
1111

12-
internal import _CShims
12+
internal import _FoundationCShims
1313

1414
#if canImport(Darwin)
1515
import Darwin

Sources/FoundationEssentials/ProcessInfo/ProcessInfo.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
internal import _CShims
13+
internal import _FoundationCShims
1414

1515
#if canImport(Darwin)
1616
import Darwin

Sources/FoundationEssentials/PropertyList/BPlistEncodingFormat.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
private protocol _BPlistStringDictionaryEncodableMarker { }
1717
extension Dictionary : _BPlistStringDictionaryEncodableMarker where Key == String, Value: Encodable { }
1818

19-
internal import _CShims
19+
internal import _FoundationCShims
2020
#if canImport(CollectionsInternal)
2121
internal import CollectionsInternal
2222
#elseif canImport(OrderedCollections)

Sources/FoundationEssentials/PropertyList/BPlistScanner.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
internal import _CShims
13+
internal import _FoundationCShims
1414

1515
typealias BPlistObjectIndex = Int
1616

Sources/FoundationEssentials/PropertyList/PlistDecoder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
internal import _CShims
13+
internal import _FoundationCShims
1414

1515
//===----------------------------------------------------------------------===//
1616
// Plist Decoder

Sources/FoundationEssentials/PropertyList/XMLPlistScanner.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
internal import _CShims
13+
internal import _FoundationCShims
1414

1515
private let plistBytes : StaticString = "plist"
1616
private let arrayBytes : StaticString = "array"

Sources/FoundationEssentials/String/BuiltInUnicodeScalarSet.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//
1010
//===----------------------------------------------------------------------===//
1111

12-
internal import _CShims
12+
internal import _FoundationCShims
1313

1414
// Native implementation of CFCharacterSet.
1515
// Represents sets of unicode scalars of those whose bitmap data we own.

Sources/FoundationEssentials/String/String+Path.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import Glibc
1818
import WinSDK
1919
#endif
2020

21-
internal import _CShims
21+
internal import _FoundationCShims
2222

2323
extension String {
2424
internal func deletingLastPathComponent() -> String {

Sources/FoundationEssentials/TimeZone/TimeZone.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import Darwin
1616
import Glibc
1717
#endif
1818

19-
internal import _CShims
19+
internal import _FoundationCShims
2020

2121
/**
2222
`TimeZone` defines the behavior of a time zone. Time zone values represent geopolitical regions. Consequently, these values have names for these regions. Time zone values also represent a temporal offset, either plus or minus, from Greenwich Mean Time (GMT) and an abbreviation (such as PST for Pacific Standard Time).

Sources/FoundationEssentials/TimeZone/TimeZone_Cache.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import ucrt
2222
import WinSDK
2323
#endif
2424

25-
internal import _CShims
25+
internal import _FoundationCShims
2626

2727
#if FOUNDATION_FRAMEWORK
2828
internal import _ForSwiftFoundation

Sources/FoundationEssentials/UUID.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//
1010
//===----------------------------------------------------------------------===//
1111

12-
internal import _CShims // uuid.h
12+
internal import _FoundationCShims // uuid.h
1313

1414
public typealias uuid_t = (UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8)
1515
public typealias uuid_string_t = (Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8)

Sources/_CShims/include/module.modulemap

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module _FoundationCShims {
2+
header "_FoundationCShims.h"
3+
4+
export *
5+
}
File renamed without changes.

0 commit comments

Comments
 (0)