]> git.lizzy.rs Git - rust.git/commit
Fix `write_cvalue` for `ByValPair` when the cvalue is not trivially a pair
authorbjorn3 <bjorn3@users.noreply.github.com>
Sun, 16 Jun 2019 10:51:16 +0000 (12:51 +0200)
committerbjorn3 <bjorn3@users.noreply.github.com>
Sun, 16 Jun 2019 10:51:16 +0000 (12:51 +0200)
commit65bc1e5b5b9191db6f0082447e22c4d971c8cc19
tree3096543c74816b862e900b6bfca0185d22c45f50
parent4d406cdcad83c992416ad213c077e3203d75cce1
Fix `write_cvalue` for `ByValPair` when the cvalue is not trivially a pair

`write_cvalue` didn't work for `Box<[u8]>`, because the inner fat ptr
was wrapped inside a newtype, which meant `Box<[u8]>` itself only had
one field.

This also simplifies `CValue::force_stack` by reusing `write_cvalue`
when it is not already on the stack.
src/value_and_place.rs