aboutsummaryrefslogtreecommitdiff
path: root/src/weak_ptr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/weak_ptr.rs')
-rw-r--r--src/weak_ptr.rs30
1 files changed, 10 insertions, 20 deletions
diff --git a/src/weak_ptr.rs b/src/weak_ptr.rs
index e9320f37..c34e969e 100644
--- a/src/weak_ptr.rs
+++ b/src/weak_ptr.rs
@@ -119,46 +119,36 @@ macro_rules! impl_weak_ptr_target {
}
unsafe fn __null(new: *mut c_void) {
extern "C" {
- attr! {
- #[link_name = concat!("cxxbridge1$std$weak_ptr$", $segment, "$null")]
- fn __null(new: *mut c_void);
- }
+ #[link_name = concat!("cxxbridge1$std$weak_ptr$", $segment, "$null")]
+ fn __null(new: *mut c_void);
}
unsafe { __null(new) }
}
unsafe fn __clone(this: *const c_void, new: *mut c_void) {
extern "C" {
- attr! {
- #[link_name = concat!("cxxbridge1$std$weak_ptr$", $segment, "$clone")]
- fn __clone(this: *const c_void, new: *mut c_void);
- }
+ #[link_name = concat!("cxxbridge1$std$weak_ptr$", $segment, "$clone")]
+ fn __clone(this: *const c_void, new: *mut c_void);
}
unsafe { __clone(this, new) }
}
unsafe fn __downgrade(shared: *const c_void, weak: *mut c_void) {
extern "C" {
- attr! {
- #[link_name = concat!("cxxbridge1$std$weak_ptr$", $segment, "$downgrade")]
- fn __downgrade(shared: *const c_void, weak: *mut c_void);
- }
+ #[link_name = concat!("cxxbridge1$std$weak_ptr$", $segment, "$downgrade")]
+ fn __downgrade(shared: *const c_void, weak: *mut c_void);
}
unsafe { __downgrade(shared, weak) }
}
unsafe fn __upgrade(weak: *const c_void, shared: *mut c_void) {
extern "C" {
- attr! {
- #[link_name = concat!("cxxbridge1$std$weak_ptr$", $segment, "$upgrade")]
- fn __upgrade(weak: *const c_void, shared: *mut c_void);
- }
+ #[link_name = concat!("cxxbridge1$std$weak_ptr$", $segment, "$upgrade")]
+ fn __upgrade(weak: *const c_void, shared: *mut c_void);
}
unsafe { __upgrade(weak, shared) }
}
unsafe fn __drop(this: *mut c_void) {
extern "C" {
- attr! {
- #[link_name = concat!("cxxbridge1$std$weak_ptr$", $segment, "$drop")]
- fn __drop(this: *mut c_void);
- }
+ #[link_name = concat!("cxxbridge1$std$weak_ptr$", $segment, "$drop")]
+ fn __drop(this: *mut c_void);
}
unsafe { __drop(this) }
}