Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyMusatkin committed Aug 5, 2024
1 parent 6cf7247 commit f500be5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/AwsCommonRuntimeKit/crt/Utilities.swift
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,10 @@ func withByteCursorFromStrings<Result>(

extension Array where Element == String {
func withByteCursorArray<R>(_ body: (UnsafePointer<aws_byte_cursor>, Int) -> R) -> R {
let cStrings = self.map { strdup($0) } + [nil]
let len = self.count
let cStrings = self.map { strdup($0) }
let cursors = cStrings.map { aws_byte_cursor_from_c_str($0) }
let len = cursors.count


defer {
cStrings.forEach { free($0) }
}
Expand Down

0 comments on commit f500be5

Please sign in to comment.