mirror of
https://github.com/denoland/rusty_v8.git
synced 2024-11-21 15:04:33 -05:00
Add cppgc::InnerMember::get_mut (#1505)
This commit is contained in:
parent
425862adbc
commit
a0dc5c1893
1 changed files with 4 additions and 0 deletions
|
@ -226,6 +226,10 @@ impl InnerMember {
|
|||
pub unsafe fn get<T: GarbageCollected>(&self) -> &T {
|
||||
unsafe { self.ptr.cast::<T>().as_ref().unwrap() }
|
||||
}
|
||||
|
||||
pub unsafe fn get_mut<T: GarbageCollected>(&mut self) -> &mut T {
|
||||
unsafe { self.ptr.cast::<T>().as_mut().unwrap() }
|
||||
}
|
||||
}
|
||||
|
||||
/// Members are used to contain strong pointers to other garbage
|
||||
|
|
Loading…
Reference in a new issue