8000 Fixed build errors on iOS · srgtuszy/llama-cpp-swift@be79e4a · GitHub
[go: up one dir, main page]

Skip to content

Commit be79e4a

Browse files
committed< 8000 div class="Box-sc-g0xbh4-0 LoadingSkeleton-sc-695d630a-0 irPhWZ irithh d-none d-sm-flex ml-1" width="60px">
Fixed build errors on iOS
1 parent f5ab075 commit be79e4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/llama-cpp-swift/LLama.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,8 @@ extension String {
322322
///
323323
/// - Parameter validatingUTF8: The array of CChars to initialize the string from.
324324
fileprivate init?(validatingUTF8 cchars: [CChar]) {
325-
if #available(macOS 15.0, *) {
326-
self.init(validating: cchars.map { UInt8(bitPattern: $0) }, as: UTF8.self)
325+
if #available(macOS 15.0, iOS 18.0, *) {
326+
self.init(validating: Data(cchars.map { UInt8(bitPattern: $0) }), as: UTF8.self)
327327
} else {
328328
self.init(cString: cchars)
329329
}

0 commit comments

Comments
 (0)
0