forked from M-Labs/libfringe
top of stack is mutable
This commit is contained in:
parent
621bd9c9ab
commit
c209eed3a6
|
@ -51,12 +51,12 @@ impl Stack {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn top(&self) -> *const u8 {
|
pub fn top(&self) -> *mut u8 {
|
||||||
unsafe {
|
unsafe {
|
||||||
match *self {
|
match *self {
|
||||||
Stack::Native { .. } => ptr::null(),
|
Stack::Native { .. } => ptr::null_mut(),
|
||||||
Stack::Managed { ref buf, .. } => {
|
Stack::Managed { ref buf, .. } => {
|
||||||
buf.data().offset(buf.len() as int) as *const _
|
buf.data().offset(buf.len() as int)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue