mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
Move code around
This commit is contained in:
parent
d14b1c261c
commit
d33dd6e6c0
7 changed files with 22 additions and 6 deletions
|
@ -14,7 +14,6 @@ impl<T> CBox<T> {
|
|||
unsafe {
|
||||
let size = std::mem::size_of::<T>();
|
||||
let ptr = libc::malloc(size);
|
||||
eprintln!("PTR = {:?}, SIZE = {}", ptr, size);
|
||||
*(ptr as *mut T) = t; // FIXME: probably UB
|
||||
Self {
|
||||
ptr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue