Skip to content

Commit

Permalink
Requires Pin on stack object
Browse files Browse the repository at this point in the history
  • Loading branch information
ultimaweapon committed Oct 24, 2024
1 parent 1f163b9 commit 59b1e41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions macros/src/cpp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,11 @@ fn render_class(item: Class) -> syn::Result<TokenStream> {
}
}

impl ::cppbind::Memory for &mut #mem {
impl ::cppbind::Memory for ::std::pin::Pin<&mut #mem> {
type Class = #class<Self>;

fn as_mut_ptr(&mut self) -> *mut () {
self.data.as_mut_ptr().cast()
unsafe { self.data.as_mut().get_unchecked_mut().as_mut_ptr().cast() }
}
}

Expand Down

0 comments on commit 59b1e41

Please sign in to comment.