Skip to content

Commit 4d87088

Browse files
committed
Omit internal access control
1 parent eed2624 commit 4d87088

16 files changed

+115
-115
lines changed

Sources/JExtractSwiftLib/CodePrinter.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ public struct CodePrinter {
5353
self.mode = mode
5454
}
5555

56-
internal mutating func append(_ text: String) {
56+
mutating func append(_ text: String) {
5757
contents.append(text)
5858
if self.verbose {
5959
Swift.print(text, terminator: "")
6060
}
6161
}
6262

63-
internal mutating func append<S>(contentsOf text: S)
63+
mutating func append<S>(contentsOf text: S)
6464
where S: Sequence, S.Element == Character {
6565
contents.append(contentsOf: text)
6666
if self.verbose {

Sources/JExtractSwiftLib/Convenience/SwiftSyntax+Extensions.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ import SwiftDiagnostics
1616
import SwiftSyntax
1717

1818
extension WithModifiersSyntax {
19-
internal var accessControlModifiers: DeclModifierListSyntax {
19+
var accessControlModifiers: DeclModifierListSyntax {
2020
modifiers.filter { modifier in
2121
modifier.isAccessControl
2222
}
2323
}
2424
}
2525

2626
extension ImplicitlyUnwrappedOptionalTypeSyntax {
27-
internal var asOptionalTypeSyntax: any TypeSyntaxProtocol {
27+
var asOptionalTypeSyntax: any TypeSyntaxProtocol {
2828
OptionalTypeSyntax(
2929
leadingTrivia: leadingTrivia,
3030
unexpectedBeforeWrappedType,

Sources/JExtractSwiftLib/Logger.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ extension Logger.Level: ExpressibleByArgument {
111111
}
112112

113113
extension Logger.Level {
114-
internal var naturalIntegralValue: Int {
114+
var naturalIntegralValue: Int {
115115
switch self {
116116
case .trace:
117117
return 0

Sources/JavaKit/JavaKitVM/LockedState.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
//===----------------------------------------------------------------------===//
1414

1515
#if canImport(os)
16-
internal import os
16+
import os
1717
#if FOUNDATION_FRAMEWORK && canImport(C.os.lock)
18-
internal import C.os.lock
18+
import C.os.lock
1919
#endif
2020
#elseif canImport(Bionic)
2121
import Bionic

Sources/SwiftKitSwift/SwiftKit.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public func _swiftjava_swift_isUniquelyReferenced(object: UnsafeMutableRawPointe
3434

3535

3636
@_alwaysEmitIntoClient @_transparent
37-
internal func _swiftjava_withHeapObject<R>(
37+
func _swiftjava_withHeapObject<R>(
3838
of object: AnyObject,
3939
_ body: (UnsafeMutableRawPointer) -> R
4040
) -> R {

Sources/_Subprocess/LockedState.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
//===----------------------------------------------------------------------===//
1414

1515
#if canImport(os)
16-
internal import os
16+
import os
1717
#if FOUNDATION_FRAMEWORK && canImport(C.os.lock)
18-
internal import C.os.lock
18+
import C.os.lock
1919
#endif
2020
#elseif canImport(Bionic)
2121
import Bionic

Sources/_Subprocess/Platforms/Subprocess+Darwin.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ import _CShims
3232

3333
// Darwin specific implementation
3434
extension Subprocess.Configuration {
35-
internal typealias StringOrRawBytes = Subprocess.StringOrRawBytes
35+
typealias StringOrRawBytes = Subprocess.StringOrRawBytes
3636

37-
internal func spawn(
37+
func spawn(
3838
withInput input: Subprocess.ExecutionInput,
3939
output: Subprocess.ExecutionOutput,
4040
error: Subprocess.ExecutionOutput
@@ -288,7 +288,7 @@ extension Subprocess.PlatformOptions: Hashable {
288288
}
289289

290290
extension Subprocess.PlatformOptions : CustomStringConvertible, CustomDebugStringConvertible {
291-
internal func description(withIndent indent: Int) -> String {
291+
func description(withIndent indent: Int) -> String {
292292
let indent = String(repeating: " ", count: indent * 4)
293293
return """
294294
PlatformOptions(
@@ -315,7 +315,7 @@ PlatformOptions(
315315

316316
// MARK: - Process Monitoring
317317
@Sendable
318-
internal func monitorProcessTermination(
318+
func monitorProcessTermination(
319319
forProcessWithIdentifier pid: Subprocess.ProcessIdentifier
320320
) async throws -> Subprocess.TerminationStatus {
321321
return try await withCheckedThrowingContinuation { continuation in

Sources/_Subprocess/Platforms/Subprocess+Linux.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ import _CShims
2222

2323
// Linux specific implementations
2424
extension Subprocess.Configuration {
25-
internal typealias StringOrRawBytes = Subprocess.StringOrRawBytes
25+
typealias StringOrRawBytes = Subprocess.StringOrRawBytes
2626

27-
internal func spawn(
27+
func spawn(
2828
withInput input: Subprocess.ExecutionInput,
2929
output: Subprocess.ExecutionOutput,
3030
error: Subprocess.ExecutionOutput
@@ -180,7 +180,7 @@ extension Subprocess.PlatformOptions: Hashable {
180180
}
181181

182182
extension Subprocess.PlatformOptions : CustomStringConvertible, CustomDebugStringConvertible {
183-
internal func description(withIndent indent: Int) -> String {
183+
func description(withIndent indent: Int) -> String {
184184
let indent = String(repeating: " ", count: indent * 4)
185185
return """
186186
PlatformOptions(
@@ -210,7 +210,7 @@ extension String {
210210

211211
// MARK: - Process Monitoring
212212
@Sendable
213-
internal func monitorProcessTermination(
213+
func monitorProcessTermination(
214214
forProcessWithIdentifier pid: Subprocess.ProcessIdentifier
215215
) async throws -> Subprocess.TerminationStatus {
216216
return try await withCheckedThrowingContinuation { continuation in

Sources/_Subprocess/Platforms/Subprocess+Unix.swift

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ extension Subprocess {
106106
}
107107
}
108108

109-
internal func tryTerminate() -> Error? {
109+
func tryTerminate() -> Error? {
110110
do {
111111
try self.send(.kill, toProcessGroup: true)
112112
} catch {
@@ -124,9 +124,9 @@ extension Subprocess {
124124

125125
// MARK: - Environment Resolution
126126
extension Subprocess.Environment {
127-
internal static let pathEnvironmentVariableName = "PATH"
127+
static let pathEnvironmentVariableName = "PATH"
128128

129-
internal func pathValue() -> String? {
129+
func pathValue() -> String? {
130130
switch self.config {
131131
case .inherit(let overrides):
132132
// If PATH value exists in overrides, use it
@@ -145,7 +145,7 @@ extension Subprocess.Environment {
145145

146146
// This method follows the standard "create" rule: `env` needs to be
147147
// manually deallocated
148-
internal func createEnv() -> [UnsafeMutablePointer<CChar>?] {
148+
func createEnv() -> [UnsafeMutablePointer<CChar>?] {
149149
func createFullCString(
150150
fromKey keyContainer: Subprocess.StringOrRawBytes,
151151
value valueContainer: Subprocess.StringOrRawBytes
@@ -212,7 +212,7 @@ extension Subprocess.Environment {
212212
extension Subprocess.Arguments {
213213
// This method follows the standard "create" rule: `args` needs to be
214214
// manually deallocated
215-
internal func createArgs(withExecutablePath executablePath: String) -> [UnsafeMutablePointer<CChar>?] {
215+
func createArgs(withExecutablePath executablePath: String) -> [UnsafeMutablePointer<CChar>?] {
216216
var argv: [UnsafeMutablePointer<CChar>?] = self.storage.map { $0.createRawBytes() }
217217
// argv[0] = executable path
218218
if let override = self.executablePathOverride {
@@ -246,7 +246,7 @@ extension Subprocess.ProcessIdentifier : CustomStringConvertible, CustomDebugStr
246246

247247
// MARK: - Executable Searching
248248
extension Subprocess.Executable {
249-
internal static var defaultSearchPaths: Set<String> {
249+
static var defaultSearchPaths: Set<String> {
250250
return Set([
251251
"/usr/bin",
252252
"/bin",
@@ -256,7 +256,7 @@ extension Subprocess.Executable {
256256
])
257257
}
258258

259-
internal func resolveExecutablePath(withPathValue pathValue: String?) -> String? {
259+
func resolveExecutablePath(withPathValue pathValue: String?) -> String? {
260260
switch self.storage {
261261
case .executable(let executableName):
262262
// If the executableName in is already a full path, return it directly
@@ -289,7 +289,7 @@ extension Subprocess.Executable {
289289

290290
// MARK: - Configuration
291291
extension Subprocess.Configuration {
292-
internal func preSpawn() throws -> (
292+
func preSpawn() throws -> (
293293
executablePath: String,
294294
env: [UnsafeMutablePointer<CChar>?],
295295
argv: [UnsafeMutablePointer<CChar>?],
@@ -343,7 +343,7 @@ extension Subprocess.Configuration {
343343
)
344344
}
345345

346-
internal static func pathAccessible(_ path: String, mode: Int32) -> Bool {
346+
static func pathAccessible(_ path: String, mode: Int32) -> Bool {
347347
return path.withCString {
348348
return access($0, mode) == 0
349349
}
@@ -352,18 +352,18 @@ extension Subprocess.Configuration {
352352

353353
// MARK: - FileDescriptor extensions
354354
extension FileDescriptor {
355-
internal static func openDevNull(
355+
static func openDevNull(
356356
withAcessMode mode: FileDescriptor.AccessMode
357357
) throws -> FileDescriptor {
358358
let devnull: FileDescriptor = try .open("/dev/null", mode)
359359
return devnull
360360
}
361361

362-
internal var platformDescriptor: Subprocess.PlatformFileDescriptor {
362+
var platformDescriptor: Subprocess.PlatformFileDescriptor {
363363
return self
364364
}
365365

366-
internal func readChunk(upToLength maxLength: Int) async throws -> Data? {
366+
func readChunk(upToLength maxLength: Int) async throws -> Data? {
367367
return try await withCheckedThrowingContinuation { continuation in
368368
DispatchIO.read(
369369
fromFileDescriptor: self.rawValue,
@@ -383,7 +383,7 @@ extension FileDescriptor {
383383
}
384384
}
385385

386-
internal func readUntilEOF(upToLength maxLength: Int) async throws -> Data {
386+
func readUntilEOF(upToLength maxLength: Int) async throws -> Data {
387387
return try await withCheckedThrowingContinuation { continuation in
388388
let dispatchIO = DispatchIO(
389389
type: .stream,
@@ -415,7 +415,7 @@ extension FileDescriptor {
415415
}
416416
}
417417

418-
internal func write<S: Sequence>(_ data: S) async throws where S.Element == UInt8 {
418+
func write<S: Sequence>(_ data: S) async throws where S.Element == UInt8 {
419419
try await withCheckedThrowingContinuation { (continuation: CheckedContinuation<Void, Error>) -> Void in
420420
let dispatchData: DispatchData = Array(data).withUnsafeBytes {
421421
return DispatchData(bytes: $0)
@@ -439,13 +439,13 @@ extension FileDescriptor {
439439
}
440440

441441
extension Subprocess {
442-
internal typealias PlatformFileDescriptor = FileDescriptor
442+
typealias PlatformFileDescriptor = FileDescriptor
443443
}
444444

445445
// MARK: - Read Buffer Size
446446
extension Subprocess {
447447
@inline(__always)
448-
internal static var readBufferSize: Int {
448+
static var readBufferSize: Int {
449449
#if canImport(Darwin)
450450
return 16384
451451
#else

0 commit comments

Comments
 (0)