Home
last modified time | relevance | path

Searched refs:cstr (Results 1 - 25 of 77) sorted by relevance

1234

/third_party/protobuf/src/google/protobuf/stubs/
H A Dstringprintf.cc152 const char* cstr[kStringPrintfVectorMaxArgs]; in StringPrintfVector() local
154 cstr[i] = v[i].c_str(); in StringPrintfVector()
156 for (int i = v.size(); i < GOOGLE_ARRAYSIZE(cstr); ++i) { in StringPrintfVector()
157 cstr[i] = &string_printf_empty_block[0]; in StringPrintfVector()
167 cstr[0], cstr[1], cstr[2], cstr[3], cstr[4], in StringPrintfVector()
168 cstr[ in StringPrintfVector()
[all...]
H A Dcommon_unittest.cc249 const char* cstr = "hello"; in TEST_F() local
250 Closure* closure = NewCallback(&SetABFunction, 789, cstr); in TEST_F()
252 EXPECT_NE(cstr, b_); in TEST_F()
255 EXPECT_EQ(cstr, b_); in TEST_F()
259 const char* cstr = "hello"; in TEST_F() local
261 &ClosureTest::SetABMethod, 789, cstr); in TEST_F()
263 EXPECT_NE(cstr, b_); in TEST_F()
266 EXPECT_EQ(cstr, b_); in TEST_F()
318 const char* cstr = "hello"; in TEST_F() local
319 Closure* closure = NewPermanentCallback(&SetABFunction, 789, cstr); in TEST_F()
334 const char* cstr = "hello"; TEST_F() local
[all...]
/third_party/rust/crates/rustix/tests/path/
H A Darg.rs12 use rustix::cstr; in test_arg()
18 assert_eq!(cstr!("hello"), Borrow::borrow(&t.as_cow_c_str().unwrap())); in test_arg()
19 assert_eq!(cstr!("hello"), Borrow::borrow(&t.into_c_str().unwrap())); in test_arg()
24 assert_eq!(cstr!("hello"), Borrow::borrow(&t.as_cow_c_str().unwrap())); in test_arg()
25 assert_eq!(cstr!("hello"), Borrow::borrow(&t.into_c_str().unwrap())); in test_arg()
30 assert_eq!(cstr!("hello"), Borrow::borrow(&t.as_cow_c_str().unwrap())); in test_arg()
31 assert_eq!(cstr!("hello"), Borrow::borrow(&t.into_c_str().unwrap())); in test_arg()
36 assert_eq!(cstr!("hello"), Borrow::borrow(&t.as_cow_c_str().unwrap())); in test_arg()
37 assert_eq!(cstr!("hello"), Borrow::borrow(&t.into_c_str().unwrap())); in test_arg()
42 assert_eq!(cstr!("hell in test_arg()
[all...]
/third_party/rust/crates/rustix/src/backend/linux_raw/
H A Dvdso_wrappers.rs349 let ptr = vdso.sym(cstr!("LINUX_2.6"), cstr!("__vdso_clock_gettime")); in init()
351 let ptr = vdso.sym(cstr!("LINUX_2.6"), cstr!("__vdso_clock_gettime64")); in init()
353 let ptr = vdso.sym(cstr!("LINUX_2.6.39"), cstr!("__kernel_clock_gettime")); in init()
355 let ptr = vdso.sym(cstr!("LINUX_2.6"), cstr!("__vdso_clock_gettime64")); in init()
357 let ptr = vdso.sym(cstr!("LINUX_4.15"), cstr!("__vdso_clock_gettim in init()
[all...]
/third_party/rust/crates/rustix/src/
H A Dcstr.rs15 /// use rustix::cstr;
18 /// let metadata = statat(cwd(), cstr!("test.txt"), AtFlags::empty())?;
26 macro_rules! cstr { macros
38 "cstr argument contains embedded NUL bytes",
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()
69 let _ = cstr!("hello\0world"); in test_invalid_cstr()
75 let _ = cstr!("\ in test_invalid_empty_cstr()
[all...]
/third_party/rust/crates/nix/src/sys/
H A Dstat.rs179 let res = path.with_nix_path(|cstr| unsafe { in mknod()
180 libc::mknod(cstr.as_ptr(), kind.bits | perm.bits() as mode_t, dev) in mknod()
201 let res = path.with_nix_path(|cstr| unsafe { in mknodat()
204 cstr.as_ptr(), in mknodat()
241 let res = path.with_nix_path(|cstr| unsafe { in stat()
242 libc::stat(cstr.as_ptr(), dst.as_mut_ptr()) in stat()
252 let res = path.with_nix_path(|cstr| unsafe { in lstat()
253 libc::lstat(cstr.as_ptr(), dst.as_mut_ptr()) in lstat()
278 let res = pathname.with_nix_path(|cstr| unsafe { in fstatat()
281 cstr in fstatat()
[all...]
H A Dinotify.rs159 let res = path.with_nix_path(|cstr| unsafe { in add_watch()
160 libc::inotify_add_watch(self.fd, cstr.as_ptr(), mask.bits()) in add_watch()
218 let cstr = unsafe { CStr::from_ptr(ptr) }; in read_events()
220 Some(OsStr::from_bytes(cstr.to_bytes()).to_owned()) in read_events()
/third_party/rust/crates/rustix/tests/fs/
H A Ddir.rs5 rustix::cstr!("."), in test_dir()
15 rustix::cstr!("Cargo.toml"), in test_dir()
26 if entry.file_name() == rustix::cstr!(".") { in test_dir()
28 } else if entry.file_name() == rustix::cstr!("..") { in test_dir()
30 } else if entry.file_name() == rustix::cstr!("Cargo.toml") { in test_dir()
/third_party/ltp/include/
H A Dtst_uid.h32 #define tst_check_resuid(cstr, ruid, euid, suid) \
33 tst_check_resuid_(__FILE__, __LINE__, (cstr), (ruid), (euid), (suid))
37 #define tst_check_resgid(cstr, rgid, egid, sgid) \
38 tst_check_resgid_(__FILE__, __LINE__, (cstr), (rgid), (egid), (sgid))
/third_party/rust/crates/rustix/tests/net/
H A Daddr.rs36 use rustix::cstr; in test_unix_addr()
41 cstr!("/") in test_unix_addr()
45 cstr!("//") in test_unix_addr()
49 cstr!("/foo/bar") in test_unix_addr()
53 cstr!("foo") in test_unix_addr()
/third_party/libwebsockets/lib/tls/
H A Dtls.c187 char cstr[10]; in lws_tls_server_conn_alpn() local
203 if (len > sizeof(cstr) - 1) in lws_tls_server_conn_alpn()
204 len = sizeof(cstr) - 1; in lws_tls_server_conn_alpn()
206 memcpy(cstr, name, len); in lws_tls_server_conn_alpn()
207 cstr[len] = '\0'; in lws_tls_server_conn_alpn()
209 lwsl_info("%s: negotiated '%s' using ALPN\n", __func__, cstr); in lws_tls_server_conn_alpn()
212 return lws_role_call_alpn_negotiated(wsi, (const char *)cstr); in lws_tls_server_conn_alpn()
/third_party/rust/crates/nix/src/mount/
H A Dlinux.rs104 target.with_nix_path(|cstr| unsafe { libc::umount(cstr.as_ptr()) })?; in umount()
110 let res = target.with_nix_path(|cstr| unsafe { in umount2()
111 libc::umount2(cstr.as_ptr(), flags.bits) in umount2()
/third_party/icu/icu4c/source/i18n/
H A Dnumber_decnum.h69 CharString cstr; in toCharString() local
70 CharStringByteSink sink(&cstr); in toCharString()
72 return cstr; in toCharString()
/third_party/node/deps/icu-small/source/i18n/
H A Dnumber_decnum.h69 CharString cstr; in toCharString() local
70 CharStringByteSink sink(&cstr); in toCharString()
72 return cstr; in toCharString()
/third_party/skia/third_party/externals/icu/source/i18n/
H A Dnumber_decnum.h62 CharString cstr; in toCharString() local
63 CharStringByteSink sink(&cstr); in toCharString()
65 return cstr; in toCharString()
/third_party/skia/src/core/
H A DSkData.cpp195 sk_sp<SkData> SkData::MakeWithCString(const char cstr[]) {
197 if (nullptr == cstr) {
198 cstr = "";
201 size = strlen(cstr) + 1;
203 return MakeWithCopy(cstr, size);
/third_party/skia/modules/androidkit/src/
H A DSkottieAnimation.cpp18 const androidkit::utils::CString cstr(env, jjson); in Animation_Create()
21 auto animation = Animation::Builder().make(cstr, strlen(cstr)); in Animation_Create()
/third_party/json/tests/src/
H A Dunit-convenience.cpp22 alt_string_iter(const char* cstr) in alt_string_iter()
23 : impl(cstr) in alt_string_iter()
64 alt_string_data(const char* cstr) in alt_string_data()
65 : impl(cstr) in alt_string_data()
/third_party/node/deps/v8/src/objects/
H A Doption-utils.h52 std::unique_ptr<char[]> cstr; in GetStringOption() local
54 GetStringOption(isolate, options, name, str_values, method_name, &cstr); in GetStringOption()
57 DCHECK_NOT_NULL(cstr.get()); in GetStringOption()
59 if (strcmp(cstr.get(), str_values[i]) == 0) { in GetStringOption()
/third_party/skia/third_party/externals/angle2/src/tests/preprocessor_tests/
H A Dnumber_test.cpp45 const char *cstr = str.c_str(); in TEST_P() local
48 lexSingleToken(cstr, &token); in TEST_P()
78 const char *cstr = str.c_str(); in expectFloat() local
81 lexSingleToken(cstr, &token); in expectFloat()
/third_party/mesa3d/src/panfrost/bifrost/test/
H A Dtest-constant-fold.cpp32 char *cstr = NULL; in to_string() local
34 FILE *f = open_memstream(&cstr, &size); in to_string()
37 auto str = std::string(cstr); in to_string()
38 free(cstr); in to_string()
/third_party/rust/crates/rustix/src/io/
H A Dprocfs.rs188 let err = renameat(file, cstr!("../."), file, cstr!(".")).unwrap_err(); in is_mountpoint()
221 let proc = proc_opendirat(cwd(), cstr!("/proc"))?; in proc()
281 let proc_self_fd = proc_opendirat(proc_self, cstr!("fd"))?;
318 let proc_self_fdinfo = proc_opendirat(proc_self, cstr!("fdinfo"))?; in proc_self_fdinfo()
363 proc_self_file(cstr!("pagemap")) in proc_self_pagemap()
378 proc_self_file(cstr!("maps")) in proc_self_maps()
393 proc_self_file(cstr!("status")) in proc_self_status()
452 && entry.file_name() == cstr!(".") in open_and_check_file()
/third_party/icu/icu4c/source/common/
H A Duenum.cpp96 const char *cstr = en->next(en, &len, status); in uenum_unextDefault() local
97 if (cstr != NULL) { in uenum_unextDefault()
102 u_charsToUChars(cstr, ustr, len+1); in uenum_unextDefault()
/third_party/node/deps/icu-small/source/common/
H A Duenum.cpp96 const char *cstr = en->next(en, &len, status); in uenum_unextDefault() local
97 if (cstr != nullptr) { in uenum_unextDefault()
102 u_charsToUChars(cstr, ustr, len+1); in uenum_unextDefault()
/third_party/skia/third_party/externals/icu/source/common/
H A Duenum.cpp96 const char *cstr = en->next(en, &len, status); in uenum_unextDefault() local
97 if (cstr != NULL) { in uenum_unextDefault()
102 u_charsToUChars(cstr, ustr, len+1); in uenum_unextDefault()

Completed in 8 milliseconds

1234