Home
last modified time | relevance | path

Searched refs:to_bytes (Results 1 – 25 of 53) sorted by relevance

123

/third_party/rust/crates/rustix/tests/process/
Duname.rs5 assert!(!name.sysname().to_bytes().is_empty()); in test_uname()
6 assert!(!name.nodename().to_bytes().is_empty()); in test_uname()
7 assert!(!name.release().to_bytes().is_empty()); in test_uname()
8 assert!(!name.version().to_bytes().is_empty()); in test_uname()
9 assert!(!name.machine().to_bytes().is_empty()); in test_uname()
12 assert!(!name.domainname().to_bytes().is_empty()); in test_uname()
/third_party/rust/crates/os_str_bytes/src/windows/
Dmod.rs79 fn to_bytes(os_string: &OsStr) -> Vec<u8> { in to_bytes() function
99 Cow::Owned(to_bytes(os_string)) in os_str_to_bytes()
112 to_bytes(&os_string) in os_string_into_vec()
/third_party/python/Lib/test/
Dtest_long.py1109 test.to_bytes(len(expected), byteorder, signed=signed),
1190 self.assertRaises(OverflowError, (256).to_bytes, 1, 'big', signed=False)
1191 self.assertRaises(OverflowError, (256).to_bytes, 1, 'big', signed=True)
1192 self.assertRaises(OverflowError, (256).to_bytes, 1, 'little', signed=False)
1193 self.assertRaises(OverflowError, (256).to_bytes, 1, 'little', signed=True)
1194 self.assertRaises(OverflowError, (-1).to_bytes, 2, 'big', signed=False)
1195 self.assertRaises(OverflowError, (-1).to_bytes, 2, 'little', signed=False)
1196 self.assertEqual((0).to_bytes(0, 'big'), b'')
1197 self.assertEqual((1).to_bytes(5, 'big'), b'\x00\x00\x00\x00\x01')
1198 self.assertEqual((0).to_bytes(5, 'big'), b'\x00\x00\x00\x00\x00')
[all …]
Dtest_plistlib.py847 offsets.append(offset.to_bytes(offset_size, 'big'))
909 chunks = [b'\xa1' + (i + 1).to_bytes(4, 'big') for i in range(N)]
/third_party/rust/crates/unicode-width/scripts/
Dunicode.py294 def to_bytes(self) -> "list[int]": member in Table
439 byte_array = table.to_bytes()
494 size_bytes = len(table.to_bytes())
/third_party/rust/crates/rust-openssl/openssl/src/
Derror.rs128 let bytes = CStr::from_ptr(data as *const _).to_bytes(); in get()
234 let bytes = CStr::from_ptr(cstr as *const _).to_bytes(); in library()
260 let bytes = CStr::from_ptr(cstr as *const _).to_bytes(); in reason()
Dstring.rs52 let slice = CStr::from_ptr(self.as_ptr()).to_bytes(); in deref()
Dec.rs439 pub fn to_bytes( in to_bytes() method
1167 .to_bytes(&group, PointConversionForm::COMPRESSED, &mut ctx) in point_bytes()
1227 .to_bytes(&group, PointConversionForm::COMPRESSED, &mut ctx) in key_from_public_key()
/third_party/python/Lib/
Dhashlib.py238 prev = prf(salt + loop.to_bytes(4, 'big'))
246 dkey += rkey.to_bytes(inner.digest_size, 'big')
Dbase64.py236 decoded += acc.to_bytes(5, 'big')
242 last = acc.to_bytes(5, 'big')
Dipaddress.py138 return address.to_bytes(4, 'big')
154 return address.to_bytes(16, 'big')
467 details = ip_int.to_bytes(byteslen, 'big')
1249 return '.'.join(map(str, ip_int.to_bytes(4, 'big')))
/third_party/rust/crates/nix/src/
Dlib.rs232 self.to_bytes().is_empty() in is_empty()
236 self.to_bytes().len() in len()
Dunistd.rs673 let len = CStr::from_ptr(buf.as_ptr() as *const c_char).to_bytes().len();
3019 …l() { Default::default() } else { CString::new(CStr::from_ptr(pw.pw_passwd).to_bytes()).unwrap() },
3021 …ll() { Default::default() } else { CString::new(CStr::from_ptr(pw.pw_gecos).to_bytes()).unwrap() },
3022 …fault::default() } else { PathBuf::from(OsStr::from_bytes(CStr::from_ptr(pw.pw_dir).to_bytes())) },
3023 …ult::default() } else { PathBuf::from(OsStr::from_bytes(CStr::from_ptr(pw.pw_shell).to_bytes())) },
3032 class: CString::new(CStr::from_ptr(pw.pw_class).to_bytes()).unwrap(),
3207 passwd: CString::new(CStr::from_ptr(gr.gr_passwd).to_bytes()).unwrap(),
/third_party/mesa3d/.gitlab-ci/bare-metal/
Deth008-power-relay.py17 msg += int(relay).to_bytes(1, 'big')
/third_party/rust/crates/os_str_bytes/src/
Draw_str.rs1497 fn to_bytes(&self) -> ByteStr<'_> { in to_bytes() method
1498 self.0.to_bytes() in to_bytes()
1510 fn to_bytes(&self) -> ByteStr<'_> { in to_bytes() method
1511 (**self).to_bytes() in to_bytes()
/third_party/rust/crates/libloading/tests/
Dwindows.rs36 assert_eq!(CStr::from_ptr(windows()).to_bytes(), b"bunny"); in test_ordinal()
/third_party/rust/crates/rust-openssl/openssl/src/ssl/
Dcallbacks.rs83 Some(CStr::from_ptr(hint).to_bytes()) in raw_client_psk()
124 Some(CStr::from_ptr(identity).to_bytes()) in raw_server_psk()
438 let line = CStr::from_ptr(line).to_bytes(); in raw_keylog()
Dmod.rs2004 str::from_utf8(version.to_bytes()).unwrap() in version()
2028 String::from_utf8(CStr::from_ptr(ptr as *const _).to_bytes().to_vec()).unwrap() in description()
2482 str::from_utf8(state.to_bytes()).unwrap() in state_string()
2493 str::from_utf8(state.to_bytes()).unwrap() in state_string_long()
2593 str::from_utf8(version.to_bytes()).unwrap() in version_str()
2710 Some(CStr::from_ptr(name as *const _).to_bytes()) in servername_raw()
3174 Some(CStr::from_ptr(ptr).to_bytes()) in psk_identity_hint()
3188 Some(CStr::from_ptr(ptr).to_bytes()) in psk_identity()
/third_party/rust/crates/nix/src/sys/
Dinotify.rs220 Some(OsStr::from_bytes(cstr.to_bytes()).to_owned()) in read_events()
/third_party/rust/crates/rustix/src/backend/libc/termios/
Dsyscalls.rs159 0 => Ok(CStr::from_ptr(buf.as_ptr().cast()).to_bytes().len()), in ttyname()
/third_party/rust/crates/regex/regex-capi/src/
Drure.rs79 let len = unsafe { CStr::from_ptr(pattern).to_bytes().len() };
577 let len = unsafe { CStr::from_ptr(pattern).to_bytes().len() };
/third_party/rust/crates/rustix/src/backend/linux_raw/
Dvdso.rs45 for b in name.to_bytes() { in elf_hash()
/third_party/rust/crates/rustix/src/backend/libc/net/
Dread_sockaddr.rs158 CStr::from_ptr(decode.sun_path.as_ptr()).to_bytes().len(), in read_sockaddr()
/third_party/skia/third_party/externals/freetype/src/type1/
Dt1parse.c482 (void)psaux->ps_parser_funcs->to_bytes( &parser->root, in T1_Get_Private_Dict()
/third_party/rust/crates/rust-cexpr/tests/
Dclang.rs169 .to_bytes() in clang_str_to_vec()

123