mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
remove c++ stuff
This commit is contained in:
parent
67bc417f11
commit
b9431187f7
2 changed files with 14 additions and 239 deletions
|
@ -31,18 +31,18 @@ pub unsafe fn roc_dealloc(c_ptr: *mut c_void, _alignment: u32) {
|
|||
return libc::free(c_ptr);
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe fn roc_panic(c_ptr: *mut c_void, tag_id: u32) {
|
||||
match tag_id {
|
||||
0 => {
|
||||
let slice = CStr::from_ptr(c_ptr as *const c_char);
|
||||
let string = slice.to_str().unwrap();
|
||||
eprintln!("Roc hit a panic: {}", string);
|
||||
std::process::exit(1);
|
||||
}
|
||||
_ => todo!(),
|
||||
}
|
||||
}
|
||||
// #[no_mangle]
|
||||
// pub unsafe fn roc_panic(c_ptr: *mut c_void, tag_id: u32) {
|
||||
// match tag_id {
|
||||
// 0 => {
|
||||
// let slice = CStr::from_ptr(c_ptr as *const c_char);
|
||||
// let string = slice.to_str().unwrap();
|
||||
// eprintln!("Roc hit a panic: {}", string);
|
||||
// std::process::exit(1);
|
||||
// }
|
||||
// _ => todo!(),
|
||||
// }
|
||||
// }
|
||||
|
||||
#[no_mangle]
|
||||
pub fn rust_main() -> isize {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue