test: fix build and tests
This commit is contained in:
@@ -30,13 +30,13 @@ struct NdbNote {
|
||||
|
||||
var note: UnsafeMutablePointer<ndb_note>?
|
||||
|
||||
let len = data.withUnsafeMutableBytes { (bytes: UnsafeMutableRawBufferPointer) -> Int in
|
||||
return Int(ndb_note_from_json(&json_cstr, Int32(json_cstr.count), ¬e, bytes.baseAddress, Int32(bufsize)))
|
||||
let len = data.withUnsafeMutableBytes { (bytes: UnsafeMutableRawBufferPointer) in
|
||||
return ndb_note_from_json(&json_cstr, Int32(json_cstr.count), ¬e, bytes.baseAddress, Int32(bufsize))
|
||||
}
|
||||
|
||||
guard let note else { return nil }
|
||||
|
||||
// Create new Data with just the valid bytes
|
||||
let validData = Data(bytes: ¬e.pointee, count: len)
|
||||
let validData = Data(bytes: ¬e.pointee, count: Int(len))
|
||||
return NdbNote(notePointer: note, data: validData)
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user