fix zig argument passing changes in str module

This commit is contained in:
Folkert 2022-04-06 15:38:47 +02:00
parent a69bf971f0
commit 5e0b724854
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
2 changed files with 23 additions and 7 deletions

View file

@ -155,16 +155,22 @@ pub fn str_from_utf8_range<'a, 'ctx, 'env>(
let result_type = env.module.get_struct_type("str.FromUtf8Result").unwrap();
let result_ptr = builder.build_alloca(result_type, "alloca_utf8_validate_bytes_result");
let count = env
.builder
.build_extract_value(count_and_start, 0, "get_count")
.unwrap();
let start = env
.builder
.build_extract_value(count_and_start, 1, "get_count")
.unwrap();
call_void_bitcode_fn(
env,
&[
list_symbol_to_c_abi(env, scope, list).into(),
complex_bitcast(
env.builder,
count_and_start.into(),
env.twice_ptr_int().into(),
"to_i128",
),
count,
start,
result_ptr.into(),
],
bitcode::STR_FROM_UTF8_RANGE,