Unverified Commit f5249f37 authored by Hero Bird's avatar Hero Bird Committed by GitHub

[core] rename ext_scratch_copy to ext_scratch_read (#169)

parent 5c5d17df
......@@ -34,7 +34,7 @@ fn read_scratch_buffer() -> Vec<u8> {
if size > 0 {
value.resize(size as usize, 0);
unsafe {
sys::ext_scratch_copy(value.as_mut_ptr() as u32, 0, size);
sys::ext_scratch_read(value.as_mut_ptr() as u32, 0, size);
}
}
value
......
......@@ -85,8 +85,9 @@ extern "C" {
/// Returns the length in bytes of the scratch buffer.
pub fn ext_scratch_size() -> u32;
/// Copies the contents of the scratch buffer to `dest_ptr`.
pub fn ext_scratch_copy(dest_ptr: u32, offset: u32, len: u32);
/// Reads the contents of the scratch buffer at the host site starting at `offset` and writes them to the
/// buffer starting at `dst_ptr` with length `len` on the smart contract site.
pub fn ext_scratch_read(dst_ptr: u32, offset: u32, len: u32);
/// Immediately returns contract execution to the caller
/// with the provided data at `data_ptr`.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment