Skip to content

Update for SE-0107: Migrate Void->Raw. #472

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 4 commits into from
Jul 26, 2016
Merged

Conversation

atrick
Copy link
Contributor

@atrick atrick commented Jul 26, 2016

Unsafe[Mutable]Pointer is replaced by Unsafe[Mutable]RawPointer.

Migrating often means simply removing casts to/from UnsafePointer
and working directly with UnsafeRawPointer instead.

Unfortunately some API's, like NSData still want UnsafePointer,
which requires "binding" memory to UInt8 before passing it to the API.

atrick added 3 commits July 26, 2016 00:07
Unsafe[Mutable]Pointer<Void> is replaced by Unsafe[Mutable]RawPointer.

Migrating often means simply removing casts to/from UnsafePointer<UInt8>
and working directly with UnsafeRawPointer instead.

Unfortunately some API's, like NSData still want UnsafePointer<UInt8>,
which requires "binding" memory to UInt8 before passing it to the API.
Remove the generic parameter from NSObject withUnretainedReference.
Raw pointers make it unnecessary and are incompatible with it.
This is a source compatible change.
@atrick
Copy link
Contributor Author

atrick commented Jul 26, 2016

Depends on Swift PR:
swiftlang/swift#3724

@atrick atrick merged commit 6cac595 into swiftlang:master Jul 26, 2016
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