Skip to content

Fix compilation for maybe_uninit && !integer128#19

Merged
dtolnay merged 2 commits intomasterfrom
ptr
Oct 14, 2019
Merged

Fix compilation for maybe_uninit && !integer128#19
dtolnay merged 2 commits intomasterfrom
ptr

Conversation

@dtolnay
Copy link
Copy Markdown
Owner

@dtolnay dtolnay commented Oct 14, 2019

Fixes #18.

src/d2s.rs Outdated
let hi2 = hi.wrapping_add((mid2 < mid) as u64);
*vp = shiftright128(mid2, hi2, j - 64 - 1);
unsafe {
ptr::write(vp, shiftright128(mid2, hi2, j - 64 - 1));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is safe, so it should not write to arbitrary pointers.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Good catch.

@dtolnay dtolnay merged commit 70dbed0 into master Oct 14, 2019
@dtolnay dtolnay deleted the ptr branch October 14, 2019 14:25
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.

ryu 1.0.1 fails to build with emscripten

2 participants