Pass args by pointer

This commit is contained in:
Ayaz Hafiz 2022-09-12 12:21:38 -04:00
parent 203b21f7d1
commit 42fdae4a57
No known key found for this signature in database
GPG Key ID: 0E2A37416A25EF58

View File

@ -21,7 +21,7 @@ use file_glue::WriteErr;
extern "C" {
#[link_name = "roc__mainForHost_1_exposed_generic"]
fn roc_main(output: *mut u8, args: RocList<RocStr>);
fn roc_main(output: *mut u8, args: *const RocList<RocStr>);
#[link_name = "roc__mainForHost_size"]
fn roc_main_size() -> i64;
@ -94,7 +94,7 @@ pub extern "C" fn rust_main() -> i32 {
// TODO allocate on the stack if it's under a certain size
let buffer = std::alloc::alloc(layout);
roc_main(buffer, args);
roc_main(buffer, &args);
let result = call_the_closure(buffer);