Wrapped C enum raw values in explicit width conversions throughout the PlayDate binding target.

This commit is contained in:
2026-07-25 10:10:43 +02:00
parent 29619720f7
commit 69813b2a76
11 changed files with 47 additions and 47 deletions
+3 -3
View File
@@ -40,7 +40,7 @@ extension Network {
case unknown = 1
init(_ error: PDNetErr) {
self = NetError(rawValue: error.rawValue) ?? .unknown
self = NetError(rawValue: Int32(error.rawValue)) ?? .unknown
}
}
@@ -66,7 +66,7 @@ extension Network {
}
public static var status: WifiStatus {
WifiStatus(rawValue: networkAPI.pointee.getStatus.unsafelyUnwrapped().rawValue) ?? .notConnected
WifiStatus(rawValue: UInt32(networkAPI.pointee.getStatus.unsafelyUnwrapped().rawValue)) ?? .notConnected
}
/// Turns the wifi radio on or off. The completion receives `nil` on
@@ -115,7 +115,7 @@ extension Network {
// The callback will not be invoked; balance the retain.
box.release()
}
return AccessReply(rawValue: reply.rawValue) ?? .ask
return AccessReply(rawValue: UInt32(reply.rawValue)) ?? .ask
}
// MARK: - HTTP