unify pointer width
This commit is contained in:
@@ -171,12 +171,13 @@ macro_rules! typed_arena_ptr_as_cell {
|
||||
}
|
||||
|
||||
macro_rules! raw_ptr_as_cell {
|
||||
($ptr:expr) => {
|
||||
($ptr:expr) => {{
|
||||
// Cell is 64-bit, but raw ptr is 32-bit in 32-bit systems
|
||||
// TODO use <*{const,mut} _>::addr instead of as when the strict_provenance feature is stable rust-lang/rust#95228
|
||||
// we might need <*{const,mut} _>::expose_provenance for strict provenance, dependening on how we recreate a pointer later
|
||||
HeapCellValue::from_raw_ptr_bytes(($ptr as usize).to_ne_bytes())
|
||||
};
|
||||
let ptr : *const _ = $ptr;
|
||||
HeapCellValue::from_ptr_addr(ptr as usize)
|
||||
}};
|
||||
}
|
||||
|
||||
macro_rules! untyped_arena_ptr_as_cell {
|
||||
|
||||
Reference in New Issue
Block a user