mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
pass the shared buffer to zig directly
This commit is contained in:
parent
a60a49bce6
commit
f7452b8889
4 changed files with 9 additions and 24 deletions
|
@ -173,9 +173,9 @@ mod test {
|
|||
};
|
||||
|
||||
// communicate the mmapped name to zig/roc
|
||||
let set_mmapped_file = run_roc_dylib!(lib, "set_mmapped_file", (*const i8, usize), ());
|
||||
let set_mmapped_file = run_roc_dylib!(lib, "set_shared_buffer", (*mut u8, usize), ());
|
||||
let mut result = RocCallResult::default();
|
||||
unsafe { set_mmapped_file((cstring.as_ptr(), name.len() + 1), &mut result) };
|
||||
unsafe { set_mmapped_file((shared_ptr, SHM_SIZE as usize), &mut result) };
|
||||
std::mem::forget(cstring);
|
||||
|
||||
let mut writer = Vec::with_capacity(1024);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue