mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-22 00:09:33 +03:00
Pass args by pointer
This commit is contained in:
parent
203b21f7d1
commit
42fdae4a57
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user