Skip to content

Commit 89a20ec

Browse files
committed
Hide Miniz from public interface for library evolution support
Add @_implementationOnly to all Miniz imports to prevent the C module from appearing in the public Swift interface, enabling use with BUILD_LIBRARY_FOR_DISTRIBUTION.
1 parent 4f0d993 commit 89a20ec

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

Sources/Zip/ZipArchive+Get.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Foundation
2-
import Miniz
2+
@_implementationOnly import Miniz
33

44
internal extension ZipArchive {
55
func get<P: _Pointer>(_ body: (inout mz_zip_archive) -> P?) throws(ZipError) -> P {

Sources/Zip/ZipArchive+InMemory.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Foundation
2-
import Miniz
2+
@_implementationOnly import Miniz
33

44
public extension ZipArchive<Data> {
55

Sources/Zip/ZipArchive+OnDisk.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Foundation
2-
import Miniz
2+
@_implementationOnly import Miniz
33

44
public extension ZipArchive<URL> {
55
/// Creates a `ZipArchive` instance for a disk-based zip archive at the specified file URL.

Sources/Zip/ZipArchive+Read.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Foundation
2-
import Miniz
2+
@_implementationOnly import Miniz
33

44
public extension ZipArchive {
55
/// Reads a file from the archive by its path.

Sources/Zip/ZipArchive+Write.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Foundation
2-
import Miniz
2+
@_implementationOnly import Miniz
33

44
public extension ZipArchive {
55
/// Adds a file to the archive with the specified data and path.

Sources/Zip/ZipArchive.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Miniz
1+
@_implementationOnly import Miniz
22
import Foundation
33

44
public class ZipArchive<Target> {

Sources/Zip/ZipError.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Miniz
1+
@_implementationOnly import Miniz
22
import Foundation
33

44
/// Swift representation of mz_zip_error

0 commit comments

Comments
 (0)