Skip to content

Commit 43f39f9

Browse files
authored
A few more 'fileprivate's for SE-0025. (#476)
1 parent d97ca4e commit 43f39f9

5 files changed

+13
-13
lines changed

Foundation/NSAttributedString.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,13 @@ public class AttributedString: NSObject, NSCopying, NSMutableCopying, NSSecureCo
111111
}
112112

113113
private extension AttributedString {
114-
fileprivate struct RangeInfo {
114+
struct RangeInfo {
115115
let rangePointer: NSRangePointer
116116
let shouldFetchLongestEffectiveRange: Bool
117117
let longestEffectiveRangeSearchRange: NSRange?
118118
}
119119

120-
fileprivate func _attributesAtIndex(_ location: Int, rangeInfo: RangeInfo) -> [String : AnyObject] {
120+
func _attributesAtIndex(_ location: Int, rangeInfo: RangeInfo) -> [String : AnyObject] {
121121
var cfRange = CFRange()
122122
return withUnsafeMutablePointer(&cfRange) { (cfRangePointer: UnsafeMutablePointer<CFRange>) -> [String : AnyObject] in
123123
// Get attributes value using CoreFoundation function
@@ -147,7 +147,7 @@ private extension AttributedString {
147147
}
148148
}
149149

150-
fileprivate func _attribute(_ attrName: String, atIndex location: Int, rangeInfo: RangeInfo) -> AnyObject? {
150+
func _attribute(_ attrName: String, atIndex location: Int, rangeInfo: RangeInfo) -> AnyObject? {
151151
var cfRange = CFRange()
152152
return withUnsafeMutablePointer(&cfRange) { (cfRangePointer: UnsafeMutablePointer<CFRange>) -> AnyObject? in
153153
// Get attribute value using CoreFoundation function
@@ -171,7 +171,7 @@ private extension AttributedString {
171171
}
172172
}
173173

174-
fileprivate func addAttributesToAttributeArray(attrs: [String : AnyObject]?) {
174+
func addAttributesToAttributeArray(attrs: [String : AnyObject]?) {
175175
guard _string.length > 0 else {
176176
return
177177
}

Foundation/NSKeyedArchiver.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ public class NSKeyedArchiver : NSCoder {
283283
}
284284
}
285285

286-
private static func _createObjectRef(_ uid : UInt32) -> CFKeyedArchiverUID {
286+
fileprivate static func _createObjectRef(_ uid : UInt32) -> CFKeyedArchiverUID {
287287
return Unmanaged<CFKeyedArchiverUID>.fromOpaque(
288288
UnsafePointer<Void>(_CFKeyedArchiverUIDCreate(kCFAllocatorSystemDefault, uid))).takeUnretainedValue()
289289
}

Foundation/NSURLRequest.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,13 @@ public class NSURLRequest: NSObject, NSSecureCoding, NSCopying, NSMutableCopying
170170
public static func supportsSecureCoding() -> Bool { return true }
171171

172172
/// The URL of the receiver.
173-
/*@NSCopying */public private(set) var url: URL?
173+
/*@NSCopying */public fileprivate(set) var url: URL?
174174

175175
/// The main document URL associated with this load.
176176
///
177177
/// This URL is used for the cookie "same domain as main
178178
/// document" policy. There may also be other future uses.
179-
/*@NSCopying*/ public private(set) var mainDocumentURL: URL?
179+
/*@NSCopying*/ public fileprivate(set) var mainDocumentURL: URL?
180180

181181
internal var _cachePolicy: CachePolicy = .useProtocolCachePolicy
182182
public var cachePolicy: CachePolicy {
@@ -189,7 +189,7 @@ public class NSURLRequest: NSObject, NSSecureCoding, NSCopying, NSMutableCopying
189189
}
190190

191191
/// Returns the HTTP request method of the receiver.
192-
public private(set) var httpMethod: String? = "GET"
192+
public fileprivate(set) var httpMethod: String? = "GET"
193193

194194
/// A dictionary containing all the HTTP header fields
195195
/// of the receiver.

Foundation/NSURLResponse.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public class URLResponse : NSObject, NSSecureCoding, NSCopying {
6767
/// that the origin server or source reported the information
6868
/// incorrectly or imprecisely. An attempt to guess the MIME type may
6969
/// be made if the origin source did not report any such information.
70-
public private(set) var mimeType: String?
70+
public fileprivate(set) var mimeType: String?
7171

7272
/// The expected content length of the receiver.
7373
///
@@ -81,7 +81,7 @@ public class URLResponse : NSObject, NSSecureCoding, NSCopying {
8181
/// The expected content length of the receiver, or `-1` if
8282
/// there is no expectation that can be arrived at regarding expected
8383
/// content length.
84-
public private(set) var expectedContentLength: Int64
84+
public fileprivate(set) var expectedContentLength: Int64
8585

8686
/// The name of the text encoding of the receiver.
8787
///
@@ -90,7 +90,7 @@ public class URLResponse : NSObject, NSSecureCoding, NSCopying {
9090
/// URL load. Clients can inspect this string and convert it to an
9191
/// NSStringEncoding or CFStringEncoding using the methods and
9292
/// functions made available in the appropriate framework.
93-
public private(set) var textEncodingName: String?
93+
public fileprivate(set) var textEncodingName: String?
9494

9595
/// A suggested filename if the resource were saved to disk.
9696
///
@@ -104,7 +104,7 @@ public class URLResponse : NSObject, NSSecureCoding, NSCopying {
104104
/// method appends the proper file extension based on the MIME type.
105105
///
106106
/// This method always returns a valid filename.
107-
public private(set) var suggestedFilename: String?
107+
public fileprivate(set) var suggestedFilename: String?
108108
}
109109

110110
/// A Response to an HTTP URL load.

Foundation/Unit.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ private class UnitConverterReciprocal : UnitConverter, NSSecureCoding {
9494
private private(set) var reciprocal: Double
9595

9696

97-
private init(reciprocal: Double) {
97+
fileprivate init(reciprocal: Double) {
9898
self.reciprocal = reciprocal
9999
}
100100

0 commit comments

Comments
 (0)