Skip to content

Commit f9e3a60

Browse files
committed
rustc: Make the generic C stack function signature include a usable return value
1 parent 5b6dbcb commit f9e3a60

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/comp/back/upcall.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ fn declare_upcalls(_tn: type_names, tydesc_type: TypeRef,
8383
dynastack_free: d("dynastack_free", [T_ptr(T_i8())], T_void()),
8484
alloc_c_stack: dr("alloc_c_stack", [T_size_t()], T_ptr(T_i8())),
8585
call_c_stack: dr("call_c_stack",
86-
[T_ptr(T_fn([], T_void())), T_ptr(T_i8())],
86+
[T_ptr(T_fn([], T_int())), T_ptr(T_i8())],
8787
T_int()),
8888
rust_personality: dr("rust_personality", [], T_i32())
8989
};

src/comp/middle/trans.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5792,7 +5792,7 @@ fn register_native_fn(ccx: @crate_ctxt, sp: span, path: [str], name: str,
57925792
cast_to_i32 = true;
57935793
}
57945794
ast::native_abi_c_stack_cdecl. {
5795-
let llfn = decl_cdecl_fn(ccx.llmod, name, T_fn([], T_void()));
5795+
let llfn = decl_cdecl_fn(ccx.llmod, name, T_fn([], T_int()));
57965796
ccx.item_ids.insert(id, llfn);
57975797
ccx.item_symbols.insert(id, name);
57985798
ret;

0 commit comments

Comments
 (0)