From: Pierre-Emmanuel Patry Date: Tue, 11 Apr 2023 11:53:13 +0000 (+0200) Subject: gccrs: libproc_macro: Change drop rust interface X-Git-Tag: basepoints/gcc-15~2639 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2c9c8cf393b3646e6bd4e9d74b33fca31d38dfe;p=thirdparty%2Fgcc.git gccrs: 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. libgrust/ChangeLog: * libproc_macro/rust/bridge/ident.rs: Change drop function interface. Signed-off-by: Pierre-Emmanuel Patry --- diff --git a/libgrust/libproc_macro/rust/bridge/ident.rs b/libgrust/libproc_macro/rust/bridge/ident.rs index dbfa649d923c..04169a46fad9 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) } } }