1
Fork 0

Update name_bytes, scoop up latest libc

Update the implementation of name_bytes to use the owned string (which
is thread safe). Also bump the src/liblibc submodule now that's merged.
This commit is contained in:
Raph Levien 2017-02-22 09:28:02 -08:00
parent 163698c45f
commit 81b9b3c542
2 changed files with 4 additions and 4 deletions

@ -1 +1 @@
Subproject commit 8d8264b967a31a1a8cebe2a05110564106b6e909
Subproject commit 64d954c6a76e896fbf7ed5c17e77c40e388abe84

View file

@ -345,14 +345,14 @@ impl DirEntry {
#[cfg(any(target_os = "android",
target_os = "linux",
target_os = "emscripten",
target_os = "haiku",
target_os = "fuchsia"))]
target_os = "haiku"))]
fn name_bytes(&self) -> &[u8] {
unsafe {
CStr::from_ptr(self.entry.d_name.as_ptr()).to_bytes()
}
}
#[cfg(target_os = "solaris")]
#[cfg(any(target_os = "solaris",
target_os = "fuchsia"))]
fn name_bytes(&self) -> &[u8] {
&*self.name
}