rustc: Make the generic C stack function signature include a usable return value

This commit is contained in:
Patrick Walton 2011-09-29 18:52:23 -07:00
parent 5b6dbcb030
commit f9e3a604a6
2 changed files with 2 additions and 2 deletions

View File

@ -83,7 +83,7 @@ fn declare_upcalls(_tn: type_names, tydesc_type: TypeRef,
dynastack_free: d("dynastack_free", [T_ptr(T_i8())], T_void()),
alloc_c_stack: dr("alloc_c_stack", [T_size_t()], T_ptr(T_i8())),
call_c_stack: dr("call_c_stack",
[T_ptr(T_fn([], T_void())), T_ptr(T_i8())],
[T_ptr(T_fn([], T_int())), T_ptr(T_i8())],
T_int()),
rust_personality: dr("rust_personality", [], T_i32())
};

View File

@ -5792,7 +5792,7 @@ fn register_native_fn(ccx: @crate_ctxt, sp: span, path: [str], name: str,
cast_to_i32 = true;
}
ast::native_abi_c_stack_cdecl. {
let llfn = decl_cdecl_fn(ccx.llmod, name, T_fn([], T_void()));
let llfn = decl_cdecl_fn(ccx.llmod, name, T_fn([], T_int()));
ccx.item_ids.insert(id, llfn);
ccx.item_symbols.insert(id, name);
ret;