containers / libkrun

A dynamic library providing Virtualization-based process isolation capabilities
Apache License 2.0
889 stars 74 forks source link

Fix constness when taking an array of string pointers #181

Closed teohhanhui closed 6 months ago

teohhanhui commented 6 months ago

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

teohhanhui commented 6 months ago

clippy failures not related...

slp commented 6 months ago

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