|
|
|
@ -163,8 +163,11 @@ pub trait Writable { |
|
|
|
|
|
|
|
|
|
fn error_message(ptr: *const i8) -> String { |
|
|
|
|
let c_str = unsafe { CStr::from_ptr(ptr) }; |
|
|
|
|
//TODO I think we're leaking the c string here; should be a call to free once realloced into rust String
|
|
|
|
|
from_utf8(c_str.to_bytes()).unwrap().to_owned() |
|
|
|
|
let s = from_utf8(c_str.to_bytes()).unwrap().to_owned(); |
|
|
|
|
unsafe{ |
|
|
|
|
libc::free(ptr as *mut libc::c_void); |
|
|
|
|
} |
|
|
|
|
s |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
impl RocksDB { |
|
|
|
|