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

fix: allow call of set_body on none opaque structs #418

Merged
merged 1 commit into from
May 13, 2023

Conversation

Chronostasys
Copy link
Contributor

Description

Allow call of set_body on none opaque structs

Related Issue

#417

How This Has Been Tested

Added some test cases in tests/all/test_types.rs. There seems to be a issue in changing the packed status of a non-opaque type(at least on my pc - a M1 macbook pro), but changing its body is working as expected.

Checklist

@TheDan64 TheDan64 self-requested a review May 12, 2023 04:03
@TheDan64
Copy link
Owner

I'm trying to remember why we added this in the first place... maybe it was an issue in LLVM 3.X? 🤔

field_types.as_mut_ptr(),
field_types.len() as u32,
packed as i32,
);
}

is_opaque
Copy link
Owner

Choose a reason for hiding this comment

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

Do you think there's any value in returning whether it was opaque, anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably no. I'm keeping this just to make sure the consistency of the function signature.

Copy link
Owner

@TheDan64 TheDan64 left a comment

Choose a reason for hiding this comment

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

Thanks!

@TheDan64 TheDan64 merged commit 41d335b into TheDan64:master May 13, 2023
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.

2 participants