-
Notifications
You must be signed in to change notification settings - Fork 1.2k
NSUUID improvements #69
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
Conversation
if (bytes != nil) { | ||
memcpy(unsafeBitCast(buffer, UnsafeMutablePointer<Void>.self), UnsafePointer<Void>(bytes), 16) | ||
} else { | ||
memset(unsafeBitCast(buffer, UnsafeMutablePointer<Void>.self), 0, 16) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually the darwin implementation crashes when nil is passed so perhaps a precondition assertion would be more correct
overall this looks good, the behavior of the nil initializer is a bit undefined on darwin so that is just a minor issue if any; once conflicts are resolved by a rebase this looks good to go to me |
I rebased and resolved conflicts. I did not change the check against nil, so the |
7001407
to
5bed24a
Compare
Thanks! |
[pull] swiftwasm from master
isEqual
andhash
NSUUID(UUIDBytes: nil)
UUIDString
implementationdescription