Skip to content

Commit b2e6db7

Browse files
authored
Merge pull request #184 from ikesyo/unnest-InputStreamError
Unnest InputStreamError to fix a link error when WMO is enabled
2 parents bb35022 + 3681d1d commit b2e6db7

File tree

5 files changed

+7
-30
lines changed

5 files changed

+7
-30
lines changed

.travis.yml

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ env:
77
- secure: kg5TFTNojZ9VOYHApONRUXSbwu+erLs3WSNNX/CKbkO8eQnBo+1koXHnEtOTQ641YRAVpFLX4QK7pbRfmWWWzR6ntNgXmvE4IUa1ggsUlcorApLq+cQin1Tp1es0/Ul0nYLJN8WXbcObKSLy8FOmHkrMWYuffMtH9e7qEL01ei0=
88

99
install:
10-
- ./script/import-certificates
1110
- carthage bootstrap --use-submodules --no-build
1211
- pod repo update --silent
1312

APIKit.xcodeproj/project.pbxproj

+2
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,7 @@
523523
DEFINES_MODULE = YES;
524524
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
525525
SWIFT_OBJC_BRIDGING_HEADER = "";
526+
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
526527
};
527528
name = Release;
528529
};
@@ -537,6 +538,7 @@
537538
isa = XCBuildConfiguration;
538539
baseConfigurationReference = 141F12401C1C9EA30026D415 /* Tests.xcconfig */;
539540
buildSettings = {
541+
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
540542
};
541543
name = Release;
542544
};

Sources/BodyParametersType/NSData+NSInputStream.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import Foundation
22

3-
extension NSData {
4-
enum InputStreamError: ErrorType {
5-
case InvalidDataCapacity(Int)
6-
case UnreadableStream(NSInputStream)
7-
}
3+
enum InputStreamError: ErrorType {
4+
case InvalidDataCapacity(Int)
5+
case UnreadableStream(NSInputStream)
6+
}
87

8+
extension NSData {
99
convenience init(inputStream: NSInputStream, capacity: Int = Int(UInt16.max)) throws {
1010
guard let data = NSMutableData(capacity: capacity) else {
1111
throw InputStreamError.InvalidDataCapacity(capacity)

script/certificates/development.p12

-3.13 KB
Binary file not shown.

script/import-certificates

-24
This file was deleted.

0 commit comments

Comments
 (0)