Adopted the standard withCString for C strings throughout the library.

This commit is contained in:
2026-09-18 11:58:57 +02:00
parent 575165dec4
commit 89c8d7a04c
22 changed files with 71 additions and 115 deletions
+1 -1
View File
@@ -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
}