]> git.lizzy.rs Git - rust.git/commit
Avoid allocation in std::sys::unix::weak
authorJosh Stone <jistone@redhat.com>
Wed, 13 Feb 2019 21:46:45 +0000 (13:46 -0800)
committerJosh Stone <jistone@redhat.com>
Wed, 13 Feb 2019 21:46:45 +0000 (13:46 -0800)
commit70c5af85e09be583128df5eda6b4de25a23387c1
treed8bc8228e9f2fdf3b90f18d071bf99ab888065e3
parente54494727855cd14229f5d456591ed2a2f027c46
Avoid allocation in std::sys::unix::weak

If we add a terminating NUL to the name in the `weak!` macro, then
`fetch()` can use `CStr::from_bytes_with_nul()` instead of `CString`.
src/libstd/sys/unix/weak.rs