Adopted the standard withCString for C strings throughout the library.
This commit is contained in:
@@ -103,7 +103,7 @@ extension JSON {
|
||||
let unmanaged = Unmanaged.passUnretained(context)
|
||||
var decoder = makeDecoder(context: unmanaged)
|
||||
var outval = json_value()
|
||||
let ok = jsonString.withPlaydateCString { cString in
|
||||
let ok = jsonString.withCString { cString in
|
||||
withExtendedLifetime(context) {
|
||||
jsonAPI.pointee.decodeString.unsafelyUnwrapped(&decoder, cString, &outval) != 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user