Skip to content

Commit 7223016

Browse files
committed
Solve Cocoapods collision
1 parent f3b1c8b commit 7223016

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ A clear and concise description of what you expected to happen.
2020

2121
## System
2222
- OS: [e.g. macOS 11, iOS 14, Ubuntu 20.04]
23-
- CodableCSV: [e.g. 0.6.4]
23+
- CodableCSV: [e.g. 0.6.5]
2424
You can check this in your SPM `Package.swift` file (or `Package.resolved` file). Alternatively, go to Xcode's Source Control Navigator (`⌘+2`) and click on `CodableCSV`.
2525

2626
## Additional context

.github/ISSUE_TEMPLATE/question.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ Add any other context about the question here (or delete this section if it is u
1616
## System
1717
Delete section if not applicable
1818
- OS: [e.g. macOS 11, iOS 14, Ubuntu 20.04]
19-
- CodableCSV: [e.g. 0.6.4]
19+
- CodableCSV: [e.g. 0.6.5]
2020
You can check this in your SPM `Package.swift` file (or `Package.resolved` file). Alternatively, go to Xcode's Source Control Navigator (`⌘+2`) and click on `CodableCSV`.

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ xcuserdata/
66
/.swiftpm
77

88
# Project specific
9+
**/experimental/

CodableCSV.podspec

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
Pod::Spec.new do |s|
22
s.name = "CodableCSV"
3-
s.version = "0.6.4"
3+
s.version = "0.6.5"
44
s.summary = "Read and write CSV files row-by-row or through Swift's Codable interface."
55
s.description = <<-DESC
66
CodableCSV offers imperative and declarative ways to read and write CSV files. It is extensively configurable and is capable of reading multiple types of entries and write to many outputs.
77
DESC
88
s.homepage = "https://github.com/dehesa/CodableCSV"
99
s.license = { :type => "MIT", :file => "LICENSE" }
1010
s.author = { "Marcos Sánchez-Dehesa Carballo" => "[email protected]" }
11-
s.social_media_url = "https://twitter.com/san_dehesa"
12-
s.ios.deployment_target = "8.0"
11+
s.ios.deployment_target = "9.0"
1312
s.osx.deployment_target = "10.10"
1413
s.watchos.deployment_target = "2.0"
1514
s.tvos.deployment_target = "9.0"

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ You can choose to add the library through SPM or Cocoapods:
3737
let package = Package(
3838
/* Your package name, supported platforms, and generated products go here */
3939
dependencies: [
40-
.package(url: "https://github.com/dehesa/CodableCSV.git", from: "0.6.4")
40+
.package(url: "https://github.com/dehesa/CodableCSV.git", from: "0.6.5")
4141
],
4242
targets: [
4343
.target(name: /* Your target name here */, dependencies: ["CodableCSV"])
@@ -48,7 +48,7 @@ You can choose to add the library through SPM or Cocoapods:
4848
- [Cocoapods](https://cocoapods.org).
4949

5050
```
51-
pod 'CodableCSV', '~> 0.6.4'
51+
pod 'CodableCSV', '~> 0.6.5'
5252
```
5353

5454
</p></details>

sources/imperative/reader/internal/ReaderDecoder.swift

+3-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ internal extension CSVReader {
3333
static func makeDecoder(from stream: InputStream, encoding: String.Encoding, chunk: Int, firstBytes: [UInt8]) throws -> ScalarDecoder {
3434
// For optimization purposes the CSV data is read in chunks and the bytes are stored in an intermediate buffer.
3535
let buffer = _StreamBuffer(bytes: firstBytes, stream: stream, chunk: chunk)
36-
return try Self._makeDecoder(from: buffer, encoding: encoding, onEmpty: { [unowned buffer] in
37-
guard case .error(let error) = buffer.status else { return }
36+
let unmanagedBuffer = Unmanaged<_StreamBuffer>.passUnretained(buffer)
37+
return try Self._makeDecoder(from: buffer, encoding: encoding, onEmpty: {
38+
guard case .error(let error) = unmanagedBuffer._withUnsafeGuaranteedRef({ $0.status }) else { return }
3839
throw error
3940
})
4041
}

0 commit comments

Comments
 (0)