top of stack is mutable

master
edef 2014-12-24 06:30:54 +01:00
parent 621bd9c9ab
commit c209eed3a6
1 changed files with 3 additions and 3 deletions

View File

@ -51,12 +51,12 @@ impl Stack {
}
}
pub fn top(&self) -> *const u8 {
pub fn top(&self) -> *mut u8 {
unsafe {
match *self {
Stack::Native { .. } => ptr::null(),
Stack::Native { .. } => ptr::null_mut(),
Stack::Managed { ref buf, .. } => {
buf.data().offset(buf.len() as int) as *const _
buf.data().offset(buf.len() as int)
}
}
}