Use the correct return type for puts
This commit is contained in:
parent
9f602bf4da
commit
51d07790df
@ -13,7 +13,7 @@
|
||||
|
||||
#[link(name = "c")]
|
||||
extern "C" {
|
||||
fn puts(s: *const u8);
|
||||
fn puts(s: *const u8) -> i32;
|
||||
}
|
||||
|
||||
#[panic_handler]
|
||||
|
@ -488,7 +488,7 @@ pub mod intrinsics {
|
||||
pub mod libc {
|
||||
#[link(name = "c")]
|
||||
extern "C" {
|
||||
pub fn puts(s: *const u8);
|
||||
pub fn puts(s: *const u8) -> i32;
|
||||
pub fn printf(format: *const i8, ...) -> i32;
|
||||
pub fn malloc(size: usize) -> *mut u8;
|
||||
pub fn free(ptr: *mut u8);
|
||||
|
@ -12,7 +12,7 @@ fn codegen_print(fx: &mut FunctionCx<'_, '_, impl cranelift_module::Backend>, ms
|
||||
&Signature {
|
||||
call_conv: CallConv::triple_default(fx.triple()),
|
||||
params: vec![AbiParam::new(pointer_ty(fx.tcx))],
|
||||
returns: vec![],
|
||||
returns: vec![AbiParam::new(types::I32)],
|
||||
},
|
||||
)
|
||||
.unwrap();
|
||||
|
Loading…
Reference in New Issue
Block a user