Fix bug in loading host-exposed list pointers

This commit is contained in:
Ayaz Hafiz 2023-01-12 10:20:11 -06:00
parent e43ba9bccf
commit 5eda760f1c
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58

View file

@ -3768,8 +3768,12 @@ fn expose_function_to_host_help_c_abi_gen_test<'a, 'ctx, 'env>(
} else {
match layout {
Layout::Builtin(Builtin::List(_)) => {
let list_type = arg_type
.into_pointer_type()
.get_element_type()
.into_struct_type();
let loaded = env.builder.new_build_load(
arg_type,
list_type,
arg.into_pointer_value(),
"load_list_pointer",
);