We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f5ab075 commit be79e4aCopy full SHA for be79e4a
Sources/llama-cpp-swift/LLama.swift
@@ -322,8 +322,8 @@ extension String {
322
///
323
/// - Parameter validatingUTF8: The array of CChars to initialize the string from.
324
fileprivate init?(validatingUTF8 cchars: [CChar]) {
325
- if #available(macOS 15.0, *) {
326
- self.init(validating: cchars.map { UInt8(bitPattern: $0) }, as: UTF8.self)
+ if #available(macOS 15.0, iOS 18.0, *) {
+ self.init(validating: Data(cchars.map { UInt8(bitPattern: $0) }), as: UTF8.self)
327
} else {
328
self.init(cString: cchars)
329
}
0 commit comments