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 constness when taking an array of string pointers #181

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

teohhanhui
Copy link
Contributor

i.e. change char *const * to const char *const *

The problem was apparent from incorrect constness in the bindgen generated bindings: https://gist.github.com/teohhanhui/647227ea483dabdcd8317c6ea228665e

e.g. *const *mut c_char instead of the expected *const *const c_char, which matches https://github.com/containers/libkrun/blob/5e376689d58c1c56a22d3935722e66fe09d28685/src/libkrun/src/lib.rs

Copy link
Collaborator

@tylerfanelli tylerfanelli left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

@teohhanhui
Copy link
Contributor Author

clippy failures not related...

@slp
Copy link
Contributor

slp commented Apr 30, 2024

Thanks for the PR! Could you please rebase on top of #182 once it gets merged?

i.e. change `char *const *` to `const char *const *`

Signed-off-by: Teoh Han Hui <[email protected]>
@slp slp merged commit 3f9166d into containers:main Apr 30, 2024
5 checks passed
@teohhanhui teohhanhui mentioned this pull request May 7, 2024
4 tasks
@teohhanhui teohhanhui deleted the fix-constness branch September 19, 2024 13:53
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.

3 participants