mirror of
https://github.com/urbit/ares.git
synced 2024-11-26 09:57:56 +03:00
For direct atom, return pointer to atom instead of immediately-stale pointer to direct copy
This commit is contained in:
parent
d56f081e6e
commit
7762e97981
@ -413,7 +413,7 @@ impl Atom {
|
|||||||
|
|
||||||
pub fn data_pointer(&self) -> *const u64 {
|
pub fn data_pointer(&self) -> *const u64 {
|
||||||
match self.as_either() {
|
match self.as_either() {
|
||||||
Either::Left(direct) => &(direct.0),
|
Either::Left(direct) => (self as *const Atom) as *const u64,
|
||||||
Either::Right(indirect) => indirect.data_pointer(),
|
Either::Right(indirect) => indirect.data_pointer(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user