For direct atom, return pointer to atom instead of immediately-stale pointer to direct copy

This commit is contained in:
Edward Amsden 2022-07-16 17:28:54 -05:00
parent d56f081e6e
commit 7762e97981
No known key found for this signature in database
GPG Key ID: 548EDF608CA956F6

View File

@ -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(),
} }
} }