|
|
@ -852,8 +852,8 @@ impl<'db, DB> Transaction<'db, DB> { |
|
|
|
let wi = ffi::rocksdb_transaction_get_writebatch_wi(self.inner); |
|
|
|
let wi = ffi::rocksdb_transaction_get_writebatch_wi(self.inner); |
|
|
|
let mut len: usize = 0; |
|
|
|
let mut len: usize = 0; |
|
|
|
let ptr = ffi::rocksdb_writebatch_wi_data(wi, &mut len as _); |
|
|
|
let ptr = ffi::rocksdb_writebatch_wi_data(wi, &mut len as _); |
|
|
|
let data = std::slice::from_raw_parts(ptr, len).to_owned(); |
|
|
|
let writebatch = ffi::rocksdb_writebatch_create_from(ptr, len); |
|
|
|
let writebatch = ffi::rocksdb_writebatch_create_from(data.as_ptr(), data.len()); |
|
|
|
ffi::rocksdb_free(wi as *mut c_void); |
|
|
|
WriteBatchWithTransaction { inner: writebatch } |
|
|
|
WriteBatchWithTransaction { inner: writebatch } |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|