Skip to content

Commit 029a324

Browse files
Merge pull request #298 from roc-lang/fix-ci
Use `c_char` instead of `i8` for argument FFI
2 parents ab135d8 + e420741 commit 029a324

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/roc_host_lib/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
use roc_env::arg::ArgToAndFromHost;
2+
use std::ffi::c_char;
23

34
/// # Safety
45
/// This function is the entry point for the program, it will be linked by roc using the legacy linker
56
/// to produce the final executable.
67
///
78
/// Note we use argc and argv to pass arguments to the program instead of std::env::args().
89
#[no_mangle]
9-
pub unsafe extern "C" fn main(argc: usize, argv: *const *const i8) -> i32 {
10+
pub unsafe extern "C" fn main(argc: usize, argv: *const *const c_char) -> i32 {
1011
let args = std::slice::from_raw_parts(argv, argc)
1112
.iter()
1213
.map(|&c_ptr| {

0 commit comments

Comments
 (0)