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

glib: Allow variable expansion in format strings passed to bool_error & result_from_gboolean #1210

Merged
merged 2 commits into from
Oct 21, 2023

Conversation

RealKC
Copy link
Contributor

@RealKC RealKC commented Oct 21, 2023

Not sure if this is the best way to go about it

Fixes #1209

@sdroege sdroege merged commit 90f24bd into gtk-rs:master Oct 21, 2023
48 checks passed
@sdroege
Copy link
Member

sdroege commented Oct 21, 2023

Thanks!

@bilelmoussaoui bilelmoussaoui added the needs-backport PR needs backporting to the current stable branch label Oct 21, 2023
@RealKC RealKC deleted the bool-error-fmt-variable-expansion branch October 21, 2023 09:27
gstreamer-github pushed a commit to sdroege/gst-plugin-rs that referenced this pull request Oct 21, 2023
loggable_error! can now expand variables and we no longer need
the format! on our side.

gtk-rs/gtk-rs-core#1210

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1366>
@RealKC
Copy link
Contributor Author

RealKC commented Oct 23, 2023

@bilelmoussaoui I don't believe this change can be backported as it is actually a breaking change, previously bool_error!(format!(...)) or bool_error!(some_variable_holding_a_string) would've compiled but after this change they will no longer compile due to becoming the first argument to format_args! which has to be a literal string afaik

@sdroege
Copy link
Member

sdroege commented Oct 23, 2023

Yes, this can't be backported unfortunately.

@sdroege sdroege removed the needs-backport PR needs backporting to the current stable branch label Oct 23, 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.

glib::bool_error! etc don't allow for variable expansion in format strings
3 participants