Home
last modified time | relevance | path

Searched refs:CString (Results 1 – 25 of 63) sorted by relevance

123

/third_party/skia/modules/androidkit/src/
DUtils.h19 class CString {
21 CString(JNIEnv* env, const jstring& jstr) in CString() function
27 ~CString() { in ~CString()
39 CString(CString&&) = delete;
40 CString(const CString&) = delete;
41 CString& operator=(CString&&) = delete;
42 CString& operator=(const CString&) = delete;
DRuntimeShaderBuilder.cpp19 SkString(androidkit::utils::CString(env, jsksl))); in ShaderBuilder_Create()
39 builder->uniform(androidkit::utils::CString(env, jname)) = val; in ShaderBuilder_SetUniformFloat()
45 builder->uniform(androidkit::utils::CString(env, jname)) = SkV3{valX, valY, valZ}; in ShaderBuilder_SetUniformFloat3()
52 builder->uniform(androidkit::utils::CString(env, jname)) = *matrix; in ShaderBuilder_SetUniformMatrix()
/third_party/rust/crates/nix/test/test_kmod/
Dmod.rs38 use std::ffi::CString;
51 finit_module(&f, &CString::new("").unwrap(), ModuleInitFlags::empty()) in test_finit_and_delete_module()
55 &CString::new(kmod_name).unwrap(), in test_finit_and_delete_module()
75 &CString::new("who=Rust number=2018").unwrap(), in test_finit_and_delete_module_with_params()
81 &CString::new(kmod_name).unwrap(), in test_finit_and_delete_module_with_params()
99 init_module(&contents, &CString::new("").unwrap()) in test_init_and_delete_module()
103 &CString::new(kmod_name).unwrap(), in test_init_and_delete_module()
124 init_module(&contents, &CString::new("who=Nix number=2015").unwrap()) in test_init_and_delete_module_with_params()
128 &CString::new(kmod_name).unwrap(), in test_init_and_delete_module_with_params()
144 finit_module(&f, &CString::new("").unwrap(), ModuleInitFlags::empty()); in test_finit_module_invalid()
[all …]
/third_party/rust/crates/rustix/src/path/
Darg.rs8 use crate::ffi::{CStr, CString};
106 CString::new(*self).map_err(|_cstr_err| io::Errno::INVAL)?, in as_cow_c_str()
116 CString::new(self).map_err(|_cstr_err| io::Errno::INVAL)?, in into_c_str()
144 CString::new(String::as_str(self)).map_err(|_cstr_err| io::Errno::INVAL)?, in as_cow_c_str()
180 CString::new(self.as_str()).map_err(|_cstr_err| io::Errno::INVAL)?, in as_cow_c_str()
190 CString::new(self).map_err(|_cstr_err| io::Errno::INVAL)?, in into_c_str()
200 f(&CString::new(self).map_err(|_cstr_err| io::Errno::INVAL)?) in into_with_c_str()
219 CString::new(self.as_bytes()).map_err(|_cstr_err| io::Errno::INVAL)?, in as_cow_c_str()
229 CString::new(self.as_bytes()).map_err(|_cstr_err| io::Errno::INVAL)?, in into_c_str()
258 CString::new(OsString::as_os_str(self).as_bytes()) in as_cow_c_str()
[all …]
/third_party/rust/crates/rustix/src/
Dcstr.rs58 use crate::ffi::CString; in test_cstr()
60 assert_eq!(cstr!(""), &*CString::new("").unwrap()); in test_cstr()
61 assert_eq!(cstr!("").to_owned(), CString::new("").unwrap()); in test_cstr()
62 assert_eq!(cstr!("hello"), &*CString::new("hello").unwrap()); in test_cstr()
63 assert_eq!(cstr!("hello").to_owned(), CString::new("hello").unwrap()); in test_cstr()
/third_party/rust/crates/rustix/src/process/
Dchdir.rs1 use crate::ffi::CString;
47 pub fn getcwd<B: Into<Vec<u8>>>(reuse: B) -> io::Result<CString> { in getcwd() argument
51 fn _getcwd(mut buffer: Vec<u8>) -> io::Result<CString> { in _getcwd() argument
67 return Ok(CString::new(buffer).unwrap()); in _getcwd()
/third_party/rust/crates/rust-openssl/openssl/src/
Dprovider.rs6 use std::ffi::CString;
29 let name = CString::new(name).unwrap(); in load()
50 let name = CString::new(name).unwrap(); in try_load()
68 let path = CString::new(path).unwrap(); in set_default_search_path()
Dpkcs12.rs5 use std::ffi::CString;
52 let pass = CString::new(pass.as_bytes()).unwrap(); in parse2()
126 name: Option<CString>,
142 self.name = Some(CString::new(name).unwrap()); in name()
228 let pass = CString::new(password).unwrap(); in build2()
Dmd.rs14 use std::ffi::CString;
103 let algorithm = CString::new(algorithm).unwrap(); in fetch()
104 let properties = properties.map(|s| CString::new(s).unwrap()); in fetch()
/third_party/rust/crates/rustix/src/termios/
Dtty.rs15 crate::ffi::CString, crate::path::SMALL_PATH_BUFFER_SIZE, alloc::vec::Vec,
46 pub fn ttyname<Fd: AsFd, B: Into<Vec<u8>>>(dirfd: Fd, reuse: B) -> io::Result<CString> { in ttyname() argument
52 fn _ttyname(dirfd: BorrowedFd<'_>, mut buffer: Vec<u8>) -> io::Result<CString> { in _ttyname() argument
67 return Ok(CString::new(buffer).unwrap()); in _ttyname()
/third_party/rust/crates/regex/regex-capi/src/
Derror.rs2 use std::ffi::CString;
11 message: Option<CString>,
64 let cmsg = match CString::new(format!("{}", err)) {
72 CString::new(msg[0..nul].to_owned()).unwrap()
Drure.rs2 use std::ffi::{CStr, CString};
261 drop(CString::from_raw(ptr));
292 let cs = match CString::new(cn.as_bytes()) {
613 let c_esc_pat = match CString::new(esc_pat) { in rure_escape()
627 unsafe { drop(CString::from_raw(s)); }
/third_party/rust/crates/nix/test/
Dtest_mq.rs2 use std::ffi::CString;
33 let mq_name = &CString::new(b"/a_nix_test_queue".as_ref()).unwrap(); in test_mq_send_and_receive()
63 let mq_name = &CString::new(b"/attr_test_get_attr".as_ref()).unwrap(); in test_mq_getattr()
88 let mq_name = &CString::new(b"/attr_test_get_attr".as_ref()).unwrap(); in test_mq_setattr()
138 let mq_name = &CString::new(b"/attr_test_get_attr".as_ref()).unwrap(); in test_mq_set_nonblocking()
162 let mq_name_opened = &CString::new(b"/mq_unlink_test".as_ref()).unwrap(); in test_mq_unlink()
165 &CString::new(b"/mq_unlink_test".as_ref()).unwrap(); in test_mq_unlink()
Dtest_nmount.rs6 use std::{ffi::CString, fs::File, path::Path};
17 let fstype = CString::new("fstype").unwrap(); in ok()
18 let nullfs = CString::new("nullfs").unwrap(); in ok()
Dtest_unistd.rs24 use std::ffi::CString;
288 let user = CString::new("root").unwrap(); in test_initgroups()
320 $(CString::new($pathname).unwrap().as_c_str(), )*
332 $(CString::new($pathname).unwrap().as_c_str(), )*
333 &[CString::from(CStr::from_bytes_with_nul(EMPTY).unwrap()),
334 CString::from(CStr::from_bytes_with_nul(DASH_C).unwrap()),
335 CString::from(CStr::from_bytes_with_nul(BIGARG).unwrap())],
336 &[CString::from(CStr::from_bytes_with_nul(FOO).unwrap()),
337 CString::from(CStr::from_bytes_with_nul(BAZ).unwrap())]
405 … execve_test_factory!(test_execve, execve, CString::new("/system/bin/sh").unwrap().as_c_str());
[all …]
/third_party/rust/crates/cxx/book/src/binding/
Drawptr.md49 use std::ffi::CString;
64 // Convert from OsString to nul-terminated CString, truncating each argument
66 let args: Vec<CString> = env::args_os()
69 CString::new(bytes).unwrap_or_else(|nul_error| {
73 CString::new(bytes).unwrap()
78 // Convert from Vec<CString> of owned strings to Vec<*mut c_char> of
/third_party/rust/crates/rustix/src/fs/
Dgetpath.rs1 use crate::ffi::CString;
12 pub fn getpath<Fd: AsFd>(fd: Fd) -> io::Result<CString> { in getpath() argument
Dat.rs9 use crate::ffi::{CStr, CString};
82 ) -> io::Result<CString> { in readlinkat() argument
86 fn _readlinkat(dirfd: BorrowedFd<'_>, path: &CStr, mut buffer: Vec<u8>) -> io::Result<CString> { in _readlinkat() argument
100 return Ok(CString::new(buffer).unwrap()); in _readlinkat()
/third_party/rust/crates/rustix/src/ffi/
Dmod.rs6 std::ffi::{CStr, CString, FromBytesWithNulError, NulError},
14 alloc::ffi::{CString, NulError},
/third_party/rust/crates/rust-openssl/openssl/src/x509/
Dstore.rs58 use std::ffi::CString;
176 let name = CString::new(name).unwrap(); in add_dir()
212 let file = CString::new(file.as_ref().as_os_str().to_str().unwrap()).unwrap(); in load_cert_file()
230 let file = CString::new(file.as_ref().as_os_str().to_str().unwrap()).unwrap(); in load_crl_file()
/third_party/rust/crates/clap/tests/derive_ui/
Dexternal_subcommand_wrong_type.rs2 use std::ffi::CString;
7 Other(Vec<CString>),
/third_party/rust/crates/libloading/src/
Dutil.rs2 use std::ffi::{CStr, CString};
22 Cow::Owned(CString::new(slice).map_err(|source| Error::CreateCString { source })?) in cstr_cow_from_bytes()
Derror.rs1 use std::ffi::CString;
4 pub struct DlDescription(pub(crate) CString);
/third_party/rust/crates/which-rs/src/
Dchecker.rs3 use std::ffi::CString;
20 CString::new(path.as_os_str().as_bytes()) in is_valid()
/third_party/rust/crates/regex/bench/src/ffi/
Dpcre1.rs3 use std::ffi::{CStr, CString};
42 let pattern = CString::new(pattern.to_owned()).unwrap(); in new()

123