Skip to content
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

Don't cast HANDLE to usize and back #635

Merged
merged 1 commit into from
Jul 5, 2024

Conversation

CraftSpider
Copy link
Contributor

Not sure if there's interest for this one - I'm aware of argument whether HANDLE really needs to be a pointer, and it's defined as isize for non-std mode bindgen, but it was an easy change so I figured I'd put it up for review.

Copy link
Member

@workingjubilee workingjubilee left a comment

Choose a reason for hiding this comment

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

weird, code that treats pointers as pointers instead of a funny integer is actually simpler than code that treats it as a funny integer!

@ChrisDenton
Copy link
Member

The trouble there was using two or three different definitions of HANDLE in the same code. I can only assume it was written before we had AtomicPtr otherwise I don't understand why that wasn't used in the first place.

@workingjubilee workingjubilee merged commit dcd0aaa into rust-lang:master Jul 5, 2024
41 checks passed
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.

None yet

3 participants