@@ -61,9 +61,9 @@ open class PropertyListSerialization : NSObject {
6161 open class func propertyList( from data: Data , options opt: ReadOptions = [ ] , format: UnsafeMutablePointer < PropertyListFormat > ? ) throws -> Any {
6262 var fmt = kCFPropertyListBinaryFormat_v1_0
6363 var error : Unmanaged < CFError > ? = nil
64- let decoded = withUnsafeMutablePointer ( to: & fmt) { ( outFmt: UnsafeMutablePointer < CFPropertyListFormat > ) -> AnyObject ? in
65- withUnsafeMutablePointer ( to: & error) { ( outErr: UnsafeMutablePointer < Unmanaged < CFError > ? > ) -> AnyObject ? in
66- return CFPropertyListCreateWithData ( kCFAllocatorSystemDefault, data. _cfObject, CFOptionFlags ( CFIndex ( opt. rawValue) ) , outFmt, outErr) . takeRetainedValue ( )
64+ let decoded = withUnsafeMutablePointer ( to: & fmt) { ( outFmt: UnsafeMutablePointer < CFPropertyListFormat > ) -> NSObject ? in
65+ withUnsafeMutablePointer ( to: & error) { ( outErr: UnsafeMutablePointer < Unmanaged < CFError > ? > ) -> NSObject ? in
66+ return unsafeBitCast ( CFPropertyListCreateWithData ( kCFAllocatorSystemDefault, data. _cfObject, CFOptionFlags ( CFIndex ( opt. rawValue) ) , outFmt, outErr) , to : NSObject . self )
6767 }
6868 }
6969 format? . pointee = PropertyListFormat ( rawValue: UInt ( fmt. rawValue) ) !
@@ -77,9 +77,9 @@ open class PropertyListSerialization : NSObject {
7777 internal class func propertyList( with stream: CFReadStream , options opt: ReadOptions , format: UnsafeMutablePointer < PropertyListFormat > ? ) throws -> Any {
7878 var fmt = kCFPropertyListBinaryFormat_v1_0
7979 var error : Unmanaged < CFError > ? = nil
80- let decoded = withUnsafeMutablePointer ( to: & fmt) { ( outFmt: UnsafeMutablePointer < CFPropertyListFormat > ) -> AnyObject ? in
81- withUnsafeMutablePointer ( to: & error) { ( outErr: UnsafeMutablePointer < Unmanaged < CFError > ? > ) -> AnyObject ? in
82- return CFPropertyListCreateWithStream ( kCFAllocatorSystemDefault, stream, 0 , CFOptionFlags ( CFIndex ( opt. rawValue) ) , outFmt, outErr) . takeRetainedValue ( )
80+ let decoded = withUnsafeMutablePointer ( to: & fmt) { ( outFmt: UnsafeMutablePointer < CFPropertyListFormat > ) -> NSObject ? in
81+ withUnsafeMutablePointer ( to: & error) { ( outErr: UnsafeMutablePointer < Unmanaged < CFError > ? > ) -> NSObject ? in
82+ return unsafeBitCast ( CFPropertyListCreateWithStream ( kCFAllocatorSystemDefault, stream, 0 , CFOptionFlags ( CFIndex ( opt. rawValue) ) , outFmt, outErr) , to : NSObject . self )
8383 }
8484 }
8585 format? . pointee = PropertyListFormat ( rawValue: UInt ( fmt. rawValue) ) !
0 commit comments