DatabaseCollation is Sendable

This commit is contained in:
Gwendal Roué committed 2024-07-27 16:37:33 +02:00
1 parent 8429eb68dd
commit 4d9d67dd67
2 files changed
+4 -4

No files matched your search

+3 -3
View File
@@ -29,10 +29,10 @@ import Foundation
/// - ``localizedCompare`` /// - ``localizedCompare``
/// - ``localizedStandardCompare`` /// - ``localizedStandardCompare``
/// - ``unicodeCompare`` /// - ``unicodeCompare``
public final class DatabaseCollation { public final class DatabaseCollation: Sendable {
/// The name of the collation. /// The name of the collation.
public let name: String public let name: String
let function: (CInt, UnsafeRawPointer?, CInt, UnsafeRawPointer?) -> ComparisonResult let function: @Sendable (CInt, UnsafeRawPointer?, CInt, UnsafeRawPointer?) -> ComparisonResult
/// Creates a collation. /// Creates a collation.
/// ///
@@ -49,7 +49,7 @@ public final class DatabaseCollation {
/// - parameters: /// - parameters:
/// - name: The collation name. /// - name: The collation name.
/// - function: A function that compares two strings. /// - function: A function that compares two strings.
public init(_ name: String, function: @escaping (String, String) -> ComparisonResult) { public init(_ name: String, function: @escaping @Sendable (String, String) -> ComparisonResult) {
self.name = name self.name = name
self.function = { (length1, buffer1, length2, buffer2) in self.function = { (length1, buffer1, length2, buffer2) in
// Buffers are not C strings: they do not end with \0. // Buffers are not C strings: they do not end with \0.
+1 -1
View File
@@ -114,7 +114,7 @@
- [X] customtransactionclock - [X] customtransactionclock
- [X] database/busymode - [X] database/busymode
- [ ] databasecancellable - [ ] databasecancellable
- [ ] databasecollation - [X] databasecollation
- [X] databasecolumndecodingstrategy - [X] databasecolumndecodingstrategy
- [X] databasecolumnencodingstrategy - [X] databasecolumnencodingstrategy
- [X] databasedatadecodingstrategy - [X] databasedatadecodingstrategy