mark rust_malloc/rust_free as unsafe

Support for this was added by 08237cad8d.
This commit is contained in:
Daniel Micay 2014-05-11 17:17:53 -04:00
parent 034f218061
commit f3de28a920

View File

@ -179,8 +179,8 @@ unsafe fn closure_exchange_malloc(drop_glue: fn(*mut u8), size: uint, align: uin
#[doc(hidden)]
#[deprecated]
#[cfg(stage0, not(test))]
pub extern "C" fn rust_malloc(size: uint) -> *mut u8 {
unsafe { exchange_malloc(size) }
pub unsafe extern "C" fn rust_malloc(size: uint) -> *mut u8 {
exchange_malloc(size)
}
// hack for libcore
@ -188,8 +188,8 @@ pub extern "C" fn rust_malloc(size: uint) -> *mut u8 {
#[doc(hidden)]
#[deprecated]
#[cfg(not(stage0), not(test))]
pub extern "C" fn rust_malloc(size: uint, align: uint) -> *mut u8 {
unsafe { exchange_malloc(size, align) }
pub unsafe extern "C" fn rust_malloc(size: uint, align: uint) -> *mut u8 {
exchange_malloc(size, align)
}
// hack for libcore
@ -197,8 +197,8 @@ pub extern "C" fn rust_malloc(size: uint, align: uint) -> *mut u8 {
#[doc(hidden)]
#[deprecated]
#[cfg(not(test))]
pub extern "C" fn rust_free(ptr: *mut u8, size: uint, align: uint) {
unsafe { exchange_free(ptr, size, align) }
pub unsafe extern "C" fn rust_free(ptr: *mut u8, size: uint, align: uint) {
exchange_free(ptr, size, align)
}
#[cfg(test)]