Re: [RFC PATCH 6/6] contrib/cgit-rs: add a subset of configset wrappers
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- Sep 7, 2024, 14:53 UTC
- Message-ID
- <Ztxo_7ijHGmQKH5T@tapette.crustytoothpaste.net>
- In-Reply-To
- <CAFySSZB56V-h0zxcv+TtP0jmTYAV1gixanCf0toYqak7Mz-yGQ@mail.gmail.com>
On 2024-09-06 at 19:37:18, Calvin Wan wrote:
Show 5 quoted lines
> While this gets rid of `std::ffi{c_char, c_int}` dependency,
> `std::ffi{CStr, CString}` are also 1.64 unfortunately, and I don't see
> the equivalent of it in libc. I'll reroll v3 without this change for
> now. Hopefully Debian stable just upgrades to 1.64 or higher and we
> don't have to worry about these ffi conversions :)I think that's actually a mistake, since some arguments like `from_bytes_with_nul` are labeled as 1.10.0. In any event, the following program compiles fine for me on 1.63, so I'm not worried about their usage:
---- use std::ffi::CStr;
fn main() {
let c = CStr::from_bytes_with_nul(b"abc\0");
let c = c.to_owned();
println!("Hello, world!\n");
}
------ brian m. carlson (they/them or he/him) Toronto, Ontario, CA