Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
rvanasa committed Jul 11, 2024
1 parent c751640 commit 97a5ebb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rts/motoko-rts/src/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ unsafe fn blob_of_cabi<M: Memory>(mem: &mut M, ret: *const u32) -> Value {
let items = *ret as *const u8; // Note: 32-bit address
let len = *ret.add(1);

// TODO: use existing Blob from `cabi_realloc`?
// TODO: reuse memory space from `cabi_realloc`?
let value = alloc_blob(mem, Bytes(len));
let blob = value.as_blob_mut();
let dest = blob.payload_addr();
Expand Down Expand Up @@ -51,5 +51,5 @@ unsafe fn cabi_realloc<M: Memory>(
if ptr.is_null() {
unreachable!();
}
return ptr;
ptr
}

0 comments on commit 97a5ebb

Please sign in to comment.