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

will_return_by_value() does not need second (size) parameter #261

Open
thoni56 opened this issue May 15, 2021 · 0 comments
Open

will_return_by_value() does not need second (size) parameter #261

thoni56 opened this issue May 15, 2021 · 0 comments
Milestone

Comments

@thoni56
Copy link
Contributor

thoni56 commented May 15, 2021

Since that constraint is intended for returning structs by value, we should (at some point) change from

will_return_by_value(<struct>, sizeof(<type of struct>));

to just

will_return_by_value(<struct>);

since the macro itself can do the sizeof and the C compiler will always know that.

It is an incompatible change, but if I knew how to work with argument counting macro magic (like @matthargett does ;-) then we could probably make some kind of overloading allowing us to move to it without breaking backwards compatibility.

@thoni56 thoni56 added this to the 2.0.0 milestone May 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant