diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2023-04-11 13:53:13 +0200 |
---|---|---|
committer | CohenArthur <arthur.cohen@embecosm.com> | 2023-04-21 09:31:24 +0000 |
commit | a3978a75914c5be49b1c3bee4f012cee1a8bbc3e (patch) | |
tree | 5f69c73a812befdcfc51f2fe3f366957c377cc54 | |
parent | 81544c237851a542046fa06f437f77b30562d2da (diff) | |
download | gcc-a3978a75914c5be49b1c3bee4f012cee1a8bbc3e.zip gcc-a3978a75914c5be49b1c3bee4f012cee1a8bbc3e.tar.gz gcc-a3978a75914c5be49b1c3bee4f012cee1a8bbc3e.tar.bz2 |
libproc_macro: Change drop rust interface
Change rust interface on drop function to take a mut pointer instead.
This will match the drop trait interface more closely.
ChangeLog:
* libgrust/libproc_macro/rust/bridge/ident.rs: Change drop
function interface.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
-rw-r--r-- | libgrust/libproc_macro/rust/bridge/ident.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgrust/libproc_macro/rust/bridge/ident.rs b/libgrust/libproc_macro/rust/bridge/ident.rs index dbfa649..04169a4 100644 --- a/libgrust/libproc_macro/rust/bridge/ident.rs +++ b/libgrust/libproc_macro/rust/bridge/ident.rs @@ -6,7 +6,7 @@ use std::fmt; extern "C" { fn Ident__new(string: *const c_uchar, len: u64) -> Ident; fn Ident__new_raw(string: *const c_uchar, len: u64) -> Ident; - fn Ident__drop(ident: *const Ident); + fn Ident__drop(ident: *mut Ident); fn Ident__clone(ident: *const Ident) -> Ident; } @@ -38,7 +38,7 @@ impl Ident { impl Drop for Ident { fn drop(&mut self) { - unsafe { Ident__drop(self as *const Ident) } + unsafe { Ident__drop(self as *mut Ident) } } } |