Skip to content

NSString._fastContents: Remove use of deprecated UTF-16 String properties. #2726

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 14, 2020

Conversation

spevans
Copy link
Contributor

@spevans spevans commented Mar 13, 2020

  • String._guts._isContiguousUTF16 is deprecated and always returns
    false.

  • String._guts.startUTF16 is deprecated and aborts if called.

  • _fastContents will always return nil as Swift Strings do not store
    UTF-16 data so no valid pointer can be returned, only nil. So hardcode
    this method to return nil.

…ties.

- String._guts._isContiguousUTF16 is deprecated and always returns
  false.

- String._guts.startUTF16 is deprecated and aborts if called.

- _fastContents will always return nil as Swift Strings do not store
  UTF-16 data so no valid pointer can be returned, only nil. So hardcode
  this method to return nil.
@spevans
Copy link
Contributor Author

spevans commented Mar 13, 2020

@swift-ci test linux

1 similar comment
@spevans
Copy link
Contributor Author

spevans commented Mar 13, 2020

@swift-ci test linux

@spevans spevans merged commit ea50497 into swiftlang:master Mar 14, 2020
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.

1 participant