Adopted the standard withCString for C strings throughout the library.
This commit is contained in:
@@ -57,9 +57,9 @@ extension Network {
|
||||
guard let userdata else { return }
|
||||
Unmanaged<Box>.fromOpaque(userdata).takeRetainedValue().body(allowed)
|
||||
}
|
||||
let reply = server.withPlaydateCString { cServer in
|
||||
let reply = server.withCString { cServer in
|
||||
if let purpose {
|
||||
return purpose.withPlaydateCString { cPurpose in
|
||||
return purpose.withCString { cPurpose in
|
||||
rawRequest(cServer, Int32(port), useSSL, cPurpose, trampoline, box.toOpaque())
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user