From c209eed3a64c60cc5795b57577beb437ace08151 Mon Sep 17 00:00:00 2001 From: edef Date: Wed, 24 Dec 2014 06:30:54 +0100 Subject: [PATCH] top of stack is mutable --- src/stack.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/stack.rs b/src/stack.rs index c465ba2..a911214 100644 --- a/src/stack.rs +++ b/src/stack.rs @@ -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) } } }