mark rust_malloc/rust_free as unsafe
Support for this was added by 08237cad8d
.
This commit is contained in:
parent
034f218061
commit
f3de28a920
1 changed files with 6 additions and 6 deletions
|
@ -179,8 +179,8 @@ unsafe fn closure_exchange_malloc(drop_glue: fn(*mut u8), size: uint, align: uin
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
#[deprecated]
|
#[deprecated]
|
||||||
#[cfg(stage0, not(test))]
|
#[cfg(stage0, not(test))]
|
||||||
pub extern "C" fn rust_malloc(size: uint) -> *mut u8 {
|
pub unsafe extern "C" fn rust_malloc(size: uint) -> *mut u8 {
|
||||||
unsafe { exchange_malloc(size) }
|
exchange_malloc(size)
|
||||||
}
|
}
|
||||||
|
|
||||||
// hack for libcore
|
// hack for libcore
|
||||||
|
@ -188,8 +188,8 @@ pub extern "C" fn rust_malloc(size: uint) -> *mut u8 {
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
#[deprecated]
|
#[deprecated]
|
||||||
#[cfg(not(stage0), not(test))]
|
#[cfg(not(stage0), not(test))]
|
||||||
pub extern "C" fn rust_malloc(size: uint, align: uint) -> *mut u8 {
|
pub unsafe extern "C" fn rust_malloc(size: uint, align: uint) -> *mut u8 {
|
||||||
unsafe { exchange_malloc(size, align) }
|
exchange_malloc(size, align)
|
||||||
}
|
}
|
||||||
|
|
||||||
// hack for libcore
|
// hack for libcore
|
||||||
|
@ -197,8 +197,8 @@ pub extern "C" fn rust_malloc(size: uint, align: uint) -> *mut u8 {
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
#[deprecated]
|
#[deprecated]
|
||||||
#[cfg(not(test))]
|
#[cfg(not(test))]
|
||||||
pub extern "C" fn rust_free(ptr: *mut u8, size: uint, align: uint) {
|
pub unsafe extern "C" fn rust_free(ptr: *mut u8, size: uint, align: uint) {
|
||||||
unsafe { exchange_free(ptr, size, align) }
|
exchange_free(ptr, size, align)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue