Skip to content

[4.2] Fix PropertyListSerialization not doing a roundtrip of Data correctly. #1958

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 4, 2019
Merged

[4.2] Fix PropertyListSerialization not doing a roundtrip of Data correctly. #1958

merged 1 commit into from
Mar 4, 2019

Conversation

millenomi
Copy link
Contributor

@millenomi millenomi commented Mar 1, 2019

In 4.x, bridging Data to an object produces a _NSSwiftData, a NSData subclass. CFData… functions weren’t set up for it, so now they must be. Unfortunately, due to the way the implementation of s-c-f differs from Darwin’s — since we have no class clusters in Swift — there’s some wrangling needed in NSMutableData to prevent infinite recursion when its base class’s methods are invoked. rdar://48420798

In 4.x, bridging `Data` to an object produces a `_NSSwiftData`, a `NSData` subclass. `CFData…` functions weren’t set up for it, so now they must be. Unfortunately, due to the way the implementation of s-c-f differs from Darwin’s — since we have no class clusters in Swift — there’s some wrangling needed in NSMutableData to prevent infinite recursion when its base class’s methods are invoked.
@millenomi
Copy link
Contributor Author

@swift-ci please test

1 similar comment
@millenomi
Copy link
Contributor Author

@swift-ci please test

@millenomi
Copy link
Contributor Author

cc @shahmishal 4.2 macOS building seems broken in a way that's independent of this patch?

@spevans
Copy link
Contributor

spevans commented Mar 4, 2019

@swift-ci test 4.2

@shahmishal
Copy link
Member

@millenomi 4.2 is only supported with 10.1 Xcode for this reason, I added a new PR testing config. (test 4.2)

@millenomi
Copy link
Contributor Author

Whoops, thanks.

@millenomi millenomi merged commit f41bd30 into swiftlang:swift-4.2-branch Mar 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants