Migrate disable/remove modules to Rust

This commit is contained in:
topjohnwu
2025-08-05 11:24:55 -07:00
committed by John Wu
parent 7961be5cfa
commit 589a270b8d
9 changed files with 184 additions and 198 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ trait PropCbExec {
impl PropCbExec for Pin<&mut PropCb> {
fn exec(&mut self, name: &Utf8CStr, value: &Utf8CStr) {
unsafe { prop_cb_exec(self.as_mut(), name.as_ptr(), value.as_ptr(), u32::MAX) }
prop_cb_exec(self.as_mut(), name, value, u32::MAX)
}
}
+2 -2
View File
@@ -429,8 +429,8 @@ static StringType get_prop_impl(const char *name, bool persist) {
return get_prop<StringType>(name, flags);
}
rust::String get_prop_rs(const char *name, bool persist) {
return get_prop_impl<rust::String>(name, persist);
rust::String get_prop_rs(rust::Utf8CStr name, bool persist) {
return get_prop_impl<rust::String>(name.data(), persist);
}
string get_prop(const char *name, bool persist) {