[gcc r14-7500] gccrs: libproc_macro: Change drop rust interface
Arthur Cohen
cohenarthur@gcc.gnu.org
Tue Jan 16 17:39:18 GMT 2024
https://gcc.gnu.org/g:d2c9c8cf393b3646e6bd4e9d74b33fca31d38dfe
commit r14-7500-gd2c9c8cf393b3646e6bd4e9d74b33fca31d38dfe
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date: Tue Apr 11 13:53:13 2023 +0200
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 <pierre-emmanuel.patry@embecosm.com>
Diff:
---
libgrust/libproc_macro/rust/bridge/ident.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libgrust/libproc_macro/rust/bridge/ident.rs b/libgrust/libproc_macro/rust/bridge/ident.rs
index dbfa649d923..04169a46fad 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) }
}
}
More information about the Gcc-cvs
mailing list